4
\$\begingroup\$

Does AndEngine have a way to manage scenes (for example, main splash, menu, options, main game), and should I use a different scene per activity?

\$\endgroup\$
3
\$\begingroup\$

Yes, you can separate your game per screen. In fact, usually only the game itself needs to use a specific 2D/3D rendering, but classic splash screen, menu, options can be done with the classic android layout and some tweaking on the appearance and animations.

Besides this let you change each screen independently, and just create different intents to play the game, with specific information (like which level to load, the saved states etc..) in the intent data

\$\endgroup\$
2
\$\begingroup\$

Personally I found it extremely easier to simplify the process with different "scenes". I created one for the menu-system, and one for the game itself. This allowed me to do some cool stuff (rendering/animation) in the menu. Just create one scene, throw some buttons/text on it. When you hit a button, remove those buttons from scene and add new ones. Just create a static management class to help your flow. Then just remove that scene, and give the gameScene to the engine, and you're good to play, and vice-versa when you're ready to exit game into menu.

\$\endgroup\$
1
\$\begingroup\$

AndEngine provieds specific classes to satisfy the game requirement.

You can have a single activity with different scenes for specific purpose:

Firstly, You can use Scene with TimerHandler to have asplash screen.

Secondly,You can use MenuScene from andengine.entity.scene.menu.MenuScene to manage MainMenu scene.

Third,on Click of a particular menu of the game u can either launch different activity say to show 'HighScore' or 'How To Play' or you can have scenes to do the same. Its your choice. But managing scenes this way is much better.

You can also refer this.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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