View Single Post
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#37
It wasn't that hard, but the performance boost is not that big... On non overclocked device (with power kernel, but with stock speeds), i've made some quick tests, with full sound support (music was playing constantly in the background consuming ~10-15% of cpu via pulseaudio)

70-75% with -s option (SDL rendering)
60-65% without any option (OpenGL ES rendering by default)

I don't want to judge wheather the game and whole device was more responsive or not, because it may be related to my excitement

The rendering logic is not really OpenGL ES friendly, there are lots of calls to drawing pairs of triangles (quads), there is a lot of room for optimizations, which can be done now

In zip you can find compiled executable and a diff of source fetched by "apt-get source lincity-ng". If you feel brave and want to run it before Aapo pushes changes to the repo, you may download the zip, copy file "lincity-ng-opengles" to /opt/lincity/games (you may leave old one untouched, so you will have /opt/lincity/games/lincity-ng and /opt/lincity/games/lincity-ng-opengles), make it executable and run with "/opt/lincity/games/lincity-ng-opengles" command. The game can also be run with "-s" command (lower-case "s", this is important) which makes it ignore my code and use pure SDL rendering.

Aapo, maybe you want to make me a co-maintainer of package, I would like to kill the bug with no sound in packages generaged by autobuilder
Attached Files
File Type: zip lincity.zip (367.7 KB, 70 views)
 

The Following 4 Users Say Thank You to misiak For This Useful Post: