1
\$\begingroup\$

I am Developing a game in AndEngine Gles2. I have splash scene, loading scene, menu scene and Level1 scene. I am using a Screen Manager to manage all scenes so I can easily switch between splash, loading and menu scenes.

The level1 scene is also loaded from menu perfectly but a problem occurs when I go back to menu scene on the completion of level. The screen turns black and nothing is shown after that, but the music keeps playing and logcat logs continue. I think the problem is with unloading the resources of Level1 because the switching between other scenes is perfect. I can't give complete code, as it's too long.

I am using bitmapTexture region, Sprites, bodies, physics Word, hud and fixtures etc. Here is my unload method:

unload(){
    setChildrenIgnorUpdate();
    clearChildScene();
    clearEntityModifier();
    clearTouchAreas();
    clearUpdateHandler();
    BitmapTextureManager.getInstance().destroyInstance();
    destroyPhysics();
}
\$\endgroup\$
3
\$\begingroup\$

I think following link become useful to you in managing multiple scene in single game. https://sites.google.com/site/matimdevelopment/creating-and-managing-scenes

Also in AndEngine forum, we discussed about this topic that link I provide to help other guys.

http://www.andengine.org/forums/gles1/how-to-manage-multiple-scene-t10350.html

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.