Switching from the main menu to the game

I am working on a racing game. At the current state I am starting the game and I am directly in the world, but I want to get first to the main menu and then into the game. I have also a Nifty GUI with the start button and the ScreenController. On the button click it can write something on the console, but i don’t know how to start the other SimpleApplication. I searched in the internet about this question, but i found nothing. So, please help.

You don’t want do this. You want to use AppStates. Detach your MainMenuAppState and attach your AwesomeRacingGameAppState. If any of this doesn’t ring any bells, you’d better read the tutorials (https://jmonkeyengine.github.io/wiki/jme3/advanced/application_states.html) :slight_smile:

1 Like

Obligatory question: “How many applications do you want in your application?”

…as tonihele indicates. You definitely don’t want to do this. Only one application per application please.

Yo dawg, I heard like applications,
so I put an application inside another application :slight_smile:

…cool username btw