Performance on GP2X

Non-platform specific questions.

Performance on GP2X

Postby motorollin » Thu Aug 23, 2007 2:27 pm

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:
motorollin
 
Posts: 54
Joined: Sun Aug 12, 2007 8:05 am
Score: 1 Give a positive score

Postby d-soldier » Thu Aug 23, 2007 3:00 pm

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?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby motorollin » Thu Aug 23, 2007 3:23 pm

Thanks. So is a collision really more difficult to work out than a distance? Using distance to detect collision sounds very imprecise.
motorollin
 
Posts: 54
Joined: Sun Aug 12, 2007 8:05 am
Score: 1 Give a positive score

Postby motorollin » Thu Aug 23, 2007 3:24 pm

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?
motorollin
 
Posts: 54
Joined: Sun Aug 12, 2007 8:05 am
Score: 1 Give a positive score

Postby pixelpoop » Thu Aug 23, 2007 11:41 pm

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.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby d-soldier » Fri Aug 24, 2007 3:03 am

I am really looking forward to some serious GP2X overhauls in upcoming versions of GE.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby motorollin » Fri Aug 24, 2007 7:09 am

I'll keep an eye on GE's progress. But for now I'm re-developing my game in C using the GP2X SDK :(
motorollin
 
Posts: 54
Joined: Sun Aug 12, 2007 8:05 am
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron