hello! How I can implement different screens (scenes) in jme? I mean, the welcome screen, setup screen, game screen, score screen… what is the better way to acomplish it? thanks!
What you want is a game state system.
Fortunate for you, I’ve posted one on code review
http://www.mojomonkeycoding.com/jmeforum/viewtopic.php?t=1000
See it in action:
http://www.mojomonkeycoding.com/jmeforum/viewtopic.php?t=1104
What you also need is for every state, you need an accompanying node and its button behaviour.
E.g. Welcome screen has a node called "Welcome Screen GUI". Then say you click on "start game" button. You send a message to the GameStateSystem that per is refering to to switch to another state. That state, when fired. Changes the rootNode children, attaches different behaviours, creates a different input…etc.
Im sure there is alot more detail than thats, but thats the basic idea.
DP
hey, that is exactly what I was looking for… thanks!