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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.