Memory question

Game Editor comments and discussion.

Memory question

Postby HitoV » Wed Jan 04, 2012 2:45 am

I have been testing a game on iphone and I notice on the first run it has little pauses when new actors make an appearance. Say for instance, the first time I press a bomb button. The animation plays very slow and everything slows to a crawl for those few seconds. But then after the initial load it runs very smooth every time it is called afterwards. My question: is there a way that I can can load all pictures for the level into memory before hand to avoid these random skips?

Is there a way to release them after the level is done in preparation for the next?
HitoV
 
Posts: 48
Joined: Sat Aug 27, 2011 8:22 am
Score: 3 Give a positive score

Re: Memory question

Postby phyzix5761 » Wed Jan 04, 2012 3:38 am

As the option: "Create at startup" selected? If not, then this could be a reason why you have lag.

Another way to handle this is to load actors on level start and put the view at a loading screen while the actors are populating. You would, of course, have to write some code to load up the actors that way.
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score

Re: Memory question

Postby HitoV » Wed Jan 04, 2012 11:41 pm

Cool cool, thanks! I was thinking of something along the same lines. The create at startup is not an option for me as I have a massive dat file with multiple levels. I am thinking I could write a script that would have a loading variable for all the level actors and that would make it cycle all animations then dispose of it. But I was hoping there was another way to write to memory and then hopefully release it from memory after the level is complete =(
HitoV
 
Posts: 48
Joined: Sat Aug 27, 2011 8:22 am
Score: 3 Give a positive score

Re: Memory question

Postby skydereign » Thu Jan 05, 2012 2:22 am

Yeah, there isn't anything provided by gE that would let you do something like this. It's a little too low level for what makslane had intended for gE, though it'd be a nice feature to add for mobile games.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest