stuntcarremake icon indicating copy to clipboard operation
stuntcarremake copied to clipboard

implement draw distance?

Open SteigerHSV opened this issue 4 years ago • 12 comments

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.

SteigerHSV avatar Dec 24 '19 00:12 SteigerHSV

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).

ptitSeb avatar Dec 24 '19 08:12 ptitSeb

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

SteigerHSV avatar Dec 25 '19 00:12 SteigerHSV

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?

ptitSeb avatar Dec 25 '19 09:12 ptitSeb

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

SteigerHSV avatar Dec 25 '19 18:12 SteigerHSV

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?

ptitSeb avatar Dec 26 '19 09:12 ptitSeb

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

SteigerHSV avatar Dec 26 '19 18:12 SteigerHSV

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.

ptitSeb avatar Dec 26 '19 19:12 ptitSeb

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.

SteigerHSV avatar Dec 27 '19 02:12 SteigerHSV

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.

ptitSeb avatar Dec 27 '19 21:12 ptitSeb

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

SteigerHSV avatar Dec 28 '19 22:12 SteigerHSV

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.

ptitSeb avatar Dec 28 '19 22:12 ptitSeb

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

SteigerHSV avatar Dec 29 '19 02:12 SteigerHSV