I'm making a side scroller with lots of things your weird dodo (my avatar) can destroy or push over. The game is meant for Android phones. The more objects per frame, the slower it gets (regardless of them being outside the window).
To this post is an attachment of my project with the heaviest level, minus many bells and whistles so there's a clearer view on the culprits (the physics objects). In the top right is a counter showing the FPS. On an Galaxy S Advance, It often drops to 30fps and I want it to stay above 50fps without having to sacrifice objects.
There is not much code left, but I have too little experience to optimize it properly, or find which pieces of code require it. I'm sure there is much about my game that I made more complex than needed.
I'm willing to transfer $10 to your PayPal if you could optimize my code (without deleting codes please, because for instance many values are necessary in the complete game), especially the way the objects are handled. I think that an array might be necessary to memorize the coordinates and place the objects once you're near. I understand that it will require more work to convert my game to such a mechanic, so in that case I will make it $15.
Please take a look at the attached project to see if you can and would like to help me out here.