I am using java + AndEngine in my game.
During the game i have some freezes, i looked for the information and found some steps how to optimize game performance:
I followed these steps, but never the less i have some freezes during the gameplay.
Now i am creating and loading all of the textures before the game started and don't unload them, is it a bad idea ? How can i optimize the game proccess ? Maybe i have to make free all of the possible memory before main activity and then reload them after each level ?
FYI: The next version of AndEngine (coming mid december) sports GLES2 so you have a lot more possibilities to improve performance with custom Shaders and Entities.
Also it will execute the startup pipeline (onLoadEngine/onLoadResources/onLoadScene/onLoadComplete) on the first frame of the GL-Thread, instead of blocking, on the UI-Thread (directly in onCreate).
Also it allows you to easily offload the stages of the pipeline into Threads, without breaking the pipeline as a whole. There will be a very simple to implement subclass of BaseGameActivity that shows a determinate ProgressDialog while the stages of the pipeline are executed. Entities will pop in the as they are attached to the scene.
In general this means, the actual loadingtimes are reduced, and more importantly, the felt loadingtimes are reducedsignificantly! Creating a loading-screen is trivially easy, as opposed to the pain it was before.
You can increase performance using AndEngine: Using the Object Pool http://c0deattack.wordpress.com/2011/01/06/andengine-using-the-object-pool/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With