Do I implement the appstates inside of my simple application file?

-working on my first program and have been reading the documentation, and was a little unsure about if that’s where it should go as the imported functions in the default game project differ from that of the testappstates sample file. :slight_smile:

Appstates is the way to separate you logic away from the SimpleApplication main class
Example of this: when you want to have Main Menu, Level 1, and Level 2, or divide you logic into Rendering phase, Physics Phase, and Post Processing Phase, …etc

In your learning journey, do you understand what different classes are for, different .java files, etc.?

i do, thanks for the patient language btw. i was expecting to get flamed for this question lol.


AppStates are generally their own .java file that the main class (or other app states) attach to the state manager.

Here is an example of a fully functional networked game:

It’s a lot to swallow at once but you might be able to look in there and get an idea of how app states can be used in different ways… from managing the main menus to running the game, etc…

Here is another simple example that I have been trying to use to get more familiar with Appstates and Controls.


Just these couple of files are a simple tower defense game, fully functional from one of the beautiful books that I have on jMonkey.
Let me know if you’d like me to share the files with you

And welcome to the forums! :banana:

thank you! would you mind sharing details ab those books? id didnt know they existed. thx : )

1 Like

thanks a bunch!