ptitSeb / stuntcarremake

A port of Stunt Car Remake to OpenPandora, Linux and Emscripten. Status: Working
http://ptitseb.github.io/stuntcarremake/
Other
71 stars 11 forks source link

implement draw distance? #11

Open SteigerHSV opened 4 years ago

SteigerHSV commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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