Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement draw distance? #11

Open
SteigerHSV opened this issue Dec 24, 2019 · 12 comments
Open

implement draw distance? #11

SteigerHSV opened this issue Dec 24, 2019 · 12 comments

Comments

@SteigerHSV
Copy link

Hey!

I was posting issue in gl4es :D. I do that because i want install and share instrucion with others how to play this game on pocketCHIP

It works now but when "menu" works fine with like 10-20fps, game itself run too slow. Idk. how you draw track model but maybe its possible to implement draw distance? maybe this could increase it

i test it with:

LD_LIBRARY_PATH=~/gl4es/lib LIBGL_FB=3 ./stuntcarracer
LD_LIBRARY_PATH=~/gl4es/lib ./stuntcarracer

and both option with -n

and i don't want to be offence because different machine spec etc. but emulating oryginal game via v64 works faster.

@ptitSeb
Copy link
Owner

ptitSeb commented Dec 24, 2019

The game should not be slow. I play it on a Pandora and it's fast. Be sure to disable msaa with -nomsaa and run in fullscreen with desktop resolution with -d.
Did you built an SDL2 version of it ? Also, you built a CHIP version of StuntCar right (with make CHIP=1)?

Also, you can add LIBGL_ES=1 to use GLES 1.1 backend, that maybe faster (or not).

@SteigerHSV
Copy link
Author

I check specs and Chip is more powerfull than Pandora Classic but kinda similar spec to Rebirth, but this is what i do step by step:

sudo apt install \

cmake \
libsdl-mixer1.2-dev \
libsdl-image1.2-dev \
libsdl-ttf2.0-dev \
libopenal-dev \
libglm-dev

sudo apt-get install chip-mali-userspace

git clone https://github.com/ptitSeb/gl4es

cd gl4es

mkdir build; cd build; cmake .. -DCHIP=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo; make

cd ~

git clone https://github.com/ptitSeb/stuntcarremake
cd stuntcarremake
make CHIP=1

and run it via: 
LD_LIBRARY_PATH=~/gl4es/lib LIBGL_FB=3 ./stuntcarremake/stuntcarracer -n

video showing command
LD_LIBRARY_PATH=~/gl4es/lib LIBGL_FB=1 ./stuntcarremake/stuntcarracer -n -d https://www.youtube.com/watch?v=ON6gjfY-Nho

also terminal output via command > output.txt:
output.txt
and command &> output2.txt:
output2.txt

@ptitSeb
Copy link
Owner

ptitSeb commented Dec 25, 2019

I don't think you are using gl4es, it's probaby mesa software that is running.

I guess gl4es libGL.so is not in ~/gl4es/lib, but maybe in ~ /gl4es/build/lib instead?

@SteigerHSV
Copy link
Author

so if it build via your instruction than yes libGL.so.1 is in /build/lib

so i use:
LD_LIBRARY_PATH=~/gl4es/build/lib LIBGL_FB=1 ./stuntcarremake/stuntcarracer -n -d
i think its trying do something but no mather if its is with or without LIBGL_FB or is set to 1-3 or -n -d
it works at 0fps.
output3.txt
output4.txt

@ptitSeb
Copy link
Owner

ptitSeb commented Dec 26, 2019

Ok, it's gl4es now that is used, and it seems the ARM GLES driver is used too. Still, if it's 0 fps, that means there is an issue with the driver somewhere.
Can you try es2gears to confirm everything is working properly on GLES driver side?

@SteigerHSV
Copy link
Author

i can try and test what ever you want, just type command to me and i will send you results.

I also create icon for your remake (also for pocket) so if you want feel free to use it

stuntcarremake

@ptitSeb
Copy link
Owner

ptitSeb commented Dec 26, 2019

Oh, nice icon! Yeah, Maybe I'll grab it.

Just type es2gears and you should see 2 3D gears turning. The fps should be at 60fps, something like that. That's a simple GLES 2 program used to test is ES is correctly installed

May you'll need to install es2gears if es2gears gives command not found. It's probably something like sudo apt install mesa-utils-extra to have it.

@SteigerHSV
Copy link
Author

Check that and yes i didint had es2gears and when i install it, it works at looks like 60 fps i can even rotate them using arrows.

@ptitSeb
Copy link
Owner

ptitSeb commented Dec 27, 2019

The fps should be printed to the console every second or 2 (I think, not totaly sure)...
If you have 60fps in es2gears, you should have a smooth framerate in stuntcarremake too.
Something is wrong, but I cannot understand what...

Do you have ssh access on you pocketchip? It would be very usefull to do a lsof | grep stuntcar while stunt car is running to see loaded module, and also some sudo perf top to see what is eating all cpu power.

@SteigerHSV
Copy link
Author

I check. That es2gear shows 51-58 fps

I didint hav lsof So i use sudo apt install lsof I have it now but when i run stunt car i cant even ctrl-tab only i can do is exit via esc

@ptitSeb
Copy link
Owner

ptitSeb commented Dec 28, 2019

Yep, that why I suggested you use ssh...

I assume ssh service is running, so from a windows PC use putty to connect to your PocketCHIP (or simply use ssh from a linux terminal if you have linux pc.

@SteigerHSV
Copy link
Author

This is geting harder than i was thinking. I can try on ubuntu because i use it to flash chip but i need to know what to do step by step. CHIP should be able SSH after all its developing board similar to other ones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants