Page 1 of 1

Performance on GP2X

PostPosted: Thu Aug 23, 2007 2:27 pm
by motorollin
Just wondering if there is any way to improve performance on a GP2X. The game I'm writing needs a lot of moving actors, all with timers and collision events. The game plays fine on Windows but runs like crap on the GP2X, even with the GP2X CPU set to 250. If there's no way of improving it I'll have to learn SDL and rewrite the whole game in C :shock:

PostPosted: Thu Aug 23, 2007 3:00 pm
by d-soldier
One way to improve the performance would be to remove all the collision events, and script them in the draw-actor script for each actor. I haven't really gotten around to trying to accomplish this yet, but it seems like the same things can be done using IF statements regarding distances... maybe?

PostPosted: Thu Aug 23, 2007 3:23 pm
by motorollin
Thanks. So is a collision really more difficult to work out than a distance? Using distance to detect collision sounds very imprecise.

PostPosted: Thu Aug 23, 2007 3:24 pm
by motorollin
Also I would be interested to try compiling the code generated by GE in the official GP2X SDK. I wonder whether there is any way to output the generated code to a text file rather than compiling it. Makslane, and ideas if this would be possible and whether it would improve performance at all?

PostPosted: Thu Aug 23, 2007 11:41 pm
by pixelpoop
I have tried using distance instead of collision and it didn't help up the speed very much. What has helped is using getactor, but you have to check it a bunch of times if your actor has any form(for every side you want to check). I use it something like this:

Actor *actors ;
actors =getactor(x+15, y); //this checks the right side of the player
if(actors){
if(actors[0].variable_name==1){health_variable-=5;} }


note: if you have a bunch of actors overlapping and you don't know the order, then you will have to check the whole string of names. ie actors[0], actors[1] etc. which will slow down the game a bunch.

PostPosted: Fri Aug 24, 2007 3:03 am
by d-soldier
I am really looking forward to some serious GP2X overhauls in upcoming versions of GE.

PostPosted: Fri Aug 24, 2007 7:09 am
by motorollin
I'll keep an eye on GE's progress. But for now I'm re-developing my game in C using the GP2X SDK :(