AppStates vs Controls vs simpleUpdate()

Well hello everyone. I am following jMonkeyEngine 3.0 Beginners guide. So far I am going good. But I need help in understanding AppStates and Control for Spatials.

Can someone explain me through game examples, such as Super Mario or Fifa or Counter-Strike. Where are AppStates/Controls theory used in this games.

Thanks :smile:

Your question is too much generic, you should really consider to buy some books about jm3 to understand this if you dont get it just reading the wiki.
Basically, controls are classes that gives you the tick update for the spatial, appstates are a bit more complicated to explain, and it will depend on how you want to handle the game, normally its a way to organize and separate diferent states on your game, like if its on game menu, or playing the game itself.
I dont remember of super mario or fifa, but counter strike probally has 2 appstates, one for the menu and other for the game, and I guess 3 controls, 1 is the player, 2 is the other players, and 3 is the boots.
Try to take a look on the geometry wars game made on jm3, it has an tutorial in the internet with all source detailed explained.

I am actually reading the book and I have figured it out how it works. I just wanted some examples to learn more.

Thanks for telling me about geometry wars game, I’ll check it out.

Here, the link for you :


1 Like

I use app states heavily in every JME app that I make… so they probably make pretty decent examples of the power of AppStates.

See SimArboreal-Editor and IsoSurfaceDemo here:

Or if you want to “read around” the entity system stuff then you can look at the Asteroid Panic and Monkey Trap examples here:

Mostly my simpleUpdate method looks like this:

public void simpleUpdate( float tpf ) {

Edit: the SimFX source also has some examples of reusable app states: