You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @Whitebrim !
I am using AnimatedSprite for a game I am making where there are some sprites (around 30 max) that are animated.
Unfortunately, it look likes there is a memory leak when updating animations every frame... I don't know how specific this is to my code but what I can show you is the stats window of the device (I ran the game on device to check real performances).
I have looked into the profiler and determined that this indeed comes from calling updateAnimation() every frame.
One thing though, I am not making a class to create objects, I am just storing objects in a table and I have function that creates them like a class because for some reason Playdate SDK won't allow to extend a class from a class that already is extended from something.
I'll be glad to provide more informations and even contribute to AnimatedSprite. Looking forward to your answer and have a nice day !
The text was updated successfully, but these errors were encountered:
Do you have problem with fps or with garbage collector running frequently?
I think both. Really the problem is : memory is slowly eaten away by something (maybe it's not AnimatedSprite but I don't really create new data to memory every frame) and then CG quicks in and slows the game every what... 30 seconds or so ?
Do you have problem with fps or with garbage collector running frequently?
I think both. Really the problem is : memory is slowly eaten away by something (maybe it's not AnimatedSprite but I don't really create new data to memory every frame) and then CG quicks in and slows the game every what... 30 seconds or so ?
You should use memory profiler and track down what is deleted by GC. In my endless runner game with target 40 fps I don't get freezes.
Hello @Whitebrim !
I am using AnimatedSprite for a game I am making where there are some sprites (around 30 max) that are animated.
Unfortunately, it look likes there is a memory leak when updating animations every frame... I don't know how specific this is to my code but what I can show you is the stats window of the device (I ran the game on device to check real performances).
I have looked into the profiler and determined that this indeed comes from calling updateAnimation() every frame.
One thing though, I am not making a class to create objects, I am just storing objects in a table and I have function that creates them like a class because for some reason Playdate SDK won't allow to extend a class from a class that already is extended from something.
I'll be glad to provide more informations and even contribute to AnimatedSprite. Looking forward to your answer and have a nice day !
The text was updated successfully, but these errors were encountered: