General game design

hi @ all,

i have a question about game design. is it useful to create for every rendering game state its own Node and to add these nodes to the rootNode or should every state render in the same node (may get with a static method) created at the beginning of the game.

is there an good tutorial about complete game design with jme?

thakns for your help


I don't quite understand what you are asking… Are you asking about GameStates? If so, they are managed by the GameStateManager, and you don't need to manually attach them to anything, just activate/deactivate them. If you are talking about something else, please elaborate more.


i think ive forgotten to say that i use fenggui to display the interface. in feng exists a root node to add the gui elements. but when i stop a game state, the windows are still rendered.

i think i have a bigger problem i my code or something not understood.

thanks duenez

first i clean up my code and then i look again at everything


Hm, as your working with fenggui this means you're adding your windows to a fengdisplay.

I would say that this one is not managed by the gamestates. So you would just have to manually remove your guiparts

while switching the states as they're not part of the jme-nodes…

Maybe you could derive a gamestate and implement a kind of deinitialise (if it doesn't exist yet) and remove all your feng-widgets there.

Maybe that helps…



if ur game is not gui intensive, this is what i would suggest:

1.use only one fenggui display object in its own render pass.

2.attach all the geometries u have for the game to the game state's root node for rendering.

3.when a change in game state occurs, remove all current widgets and construct the new widgets.