-
memory
Hi guys,
I am trying to make a game for the iphone. I'm testing it on a 3GS.
It seems to run fine when the build is first completed, however subsequent restarts of the game (ie. "Restart the application" or "Previous frame") don't seem to "release" the memory used by the objects - so it will be running very slowly - then basically on an ad-hoc basis with continuing restarts, it may run at normal speed again.
Any ideas what might be causing this?
Is there some other event I should be using? Is it necessary to manually destroy objects before changing frames?
Thanks,
Dave.
-
Are you running the latest build Dave? I remember one of the earlier builds had a problem releasing memory.
-
Thanks Jason. I'm using Build 253 - I assume that's the latest.
I've only had the ios exporter for a couple of days.
-
Yes that should be the latest... now you've put in the product codes, you should be able to get access to the Beta forums.
It should release the memory on its own i believe, so you shouldn't have to destroy lots of objects... of course are you using Global objects? they wouldn't be destroyed.
-
Not using global objects, I'm creating a lot of AO at runtime though every 3 m/s or so - but they are destroyed when they leave the screen (which is almost immediate). No more than 30 objects on the level at a time as per the debugger. I can see lag in the xcode simulator too, but not in the MMF build.
Very strange.
-
Very strange indeed.
One word of warning though, don't use the simulator as a guide to performance or testing.. as on the whole it's just meant to show your app loads (this is a general thing and not to do with mmf)....
So just to confirm. Running on the device has the problem right? I wonder if this is to do with something like the performance post ? There are some possible issues with performance (not memory) if an app is restarted from a closed (HOME) button.
Might be worth getting your App to Andos to see if he can see anything weird going on?
-
How are you running the device? Make sure you're running it on your device as 'release' and not debug. The xcode debugger that runs slows things down substantially. You can see the pulldown to change this in these screenshots:
http://developer.apple.com/library/m...emeDialog.html
-
The current version has a memory leak when it involves rotated and/or scaled objects when the runtime checks for collisions.
If your game uses that then it could be the cause. The next version will be released soon in the owners lounge.
-
Hi guys, thanks for the tips.
Still haven't been able to fix it - I will try and create a small app to reproduce it.
It has nothing to do with "how long" the app is running and more to do with running slow and jerky on a random basis. Subsequent restarts of the game maybe 1 in 4 is not jerky/laggy.
-
Have you tried setting the framerate to 60FPS and enabling VSync? Updated to build 254?
-
Thanks Distant, I will try that and report back
-
1 Attachment(s)
still no luck, have tried the above.
here's a simple example - it lags even in the simulator.
-
Hi CT,
I'd really appreciate a response on this.
In my example - although there's an "always" event - there's no more than 80-100 objects on screen at once, and it uses 11MB RAM.
I would NOT expect this to lag.
I cannot continue to develop using iOS export if it can't handle what I would consider basic functionality.
Thanks.
-
do you have visible counters on the screen for testing or anything? they impact the frame rate a lot right now if not invisible.
I have something like 240 actives at one time in my game and it's running, at 30fps mind you.
-
Hi Diablohead,
In my game I have one visible counter, however in the example I attached there are no counters at all.
-
Have you enabled compression by colour reduction in the application's properties?