Page 1 of 1
Memory question
Posted:
Wed Jan 04, 2012 2:45 am
by HitoV
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?
Re: Memory question
Posted:
Wed Jan 04, 2012 3:38 am
by phyzix5761
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.
Re: Memory question
Posted:
Wed Jan 04, 2012 11:41 pm
by HitoV
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 =(
Re: Memory question
Posted:
Thu Jan 05, 2012 2:22 am
by skydereign
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.