The beauty of AppStates and controls

The ideal jMonkeyEngine application has an empty simpleUpdate() method in its main class—all entity behavior would be neatly modularized and encapsulated in controls and AppState objects.

The ideal jMonkeyEngine application's simpleInitApp() method would have only two lines of code: one that creates a custom StartScreenAppState instance, and a second line that attaches it to the stateManager object of the SimpleApplication class. Let's look at one simple example of how you can structure your application using several modular AppState objects:

  1. The StartScreenAppState tab would display a main menu with buttons, such as play, options, and quit. It has a visible mouse pointer and its inputManager object responds ...

Get jMonkeyEngine 3.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.