Game Development Community

FPS slowly going down?

by Matthew Harris · in iTorque 2D · 05/27/2009 (12:08 am) · 3 replies

Hey, I was pretty happy with a 25-30fps in my iTGB game.

As i run it on the iphone, the FPS slowly goes down and down. I dunno whats causing this. I didn't want to wait and see what happend when it got real low. I exited at 5 fps. Anyone know what could be causing this?

- Matt

#1
05/27/2009 (3:09 am)
Sounds like you allocate data that you never free or the amount of objects with scripts just grow and grow.
#2
05/27/2009 (3:10 am)
I would guess that you have a leak of some kind. Things to check:-

1. Are you creating objects but, never deleting them?
2. Have you created objects that you don't re-use (destroy them each time)?
3. Does the number of objects in the game go up as time goes on i.e. more objects each level?

If the answer is yes to any of those, then that would be why your game is slowing down as time goes on.
#3
05/27/2009 (8:57 am)
@Matthew.... could be related to what I experienced. I even went ahead and manually destroyed everything I ever created... and still had a leak. Hopefully you can expose what's causing it. :)