The situation: Making a side scrolling game. One main loop calls a function which moves 4 layers. On the different layers there are moving sprites. When different sprites are moving in combination with the 4 moving layers, this causes the game to not move that smooth anymore.
Things you should know:
- I use texture atlas
- There are no memory leaks
- CPU is not fully used
- Only the sprites on the screen are displayed (what I mean is that the problem is not related to to many sprites, I think..)
- Sometimes there is a warning about the capacity but due to some searching I found that this is normal.
- When I move a sprite (for example the player) the sprite is used in other methods to get it's current location
- Because of the moving layers, their x position gets small really fast
Games like Mighty Fin run so smooth, I want to know how to accomplish that.
Are there any tips on optimizing this? Thanks in advance!