Few Questions

I’m following the tutorials and stuff bit by bit, so I din’t follow them all.

But wondering a few things already, maybe i’ll learn when I fully read the tuts and played around for a bit.

But here are they anyways if people can reply if they want.

If you want to make a game with a loading screen will that be a node?

If you want to make a gui when you start up the game, where they can choose like create account, play, options and stuff is that also a seperate node under the root node?

If you want different maps, are that seperate nodes to?

I’m kinda curious how you seperate all that stuff

can anyone ellborate on this?

Well there is no perfect solution for this, but various different with pro and cons.

Following I will describe the System i use for a space game mmo I try to program:

The Game is devided into different Scenes, they are special Object that contain a Node and some external logic needed to fullfill their purpose.

LoadingState → After this is started it is used untill an external(State external not application external) event happens (aka perloader finsihed work)

Game State → The actual scene ued to display

Various → Some various states, like the login menu

The states are attached to the rootnode when enabled and all other states are removed from the rootnode.

Maps, I have one Node (the on in the Game State) that represents the current map. Every object is safed in a database and has a levelid. With cleaning the GameState Node and loading every object with id=x i load level x

Gui, I currently use a component based gui system that is mostly written by another forum member(lutherion) this itself has one Node as main and for each container a node where all subelements are added.

Depending on the needs this can be drastically different. Like having a node loading saving system, taht stores entire level parts and is loaded when needed from a file.(Singleplayer rpgs might use this as they can easily store the state of any object that way)

Only one node with only one level present only the ability to replace current level with other preprocessed levels no persitent data(Counterstrike,Unreal 2004 ect)

I use the built in Nifty GUI for my start menus and stuff. My application is organized into “states” also but I use JME AppStates for this.

All the main application does is basically create the MainMenuAppState which is both an AppState and a nifty ScreenController. It adds this to the stateManager and gives it to the nifty gui when it loads the menu screens XML file.

MainMenuAppState does all of the menu interaction and menu screen transition. When either the single player or mult-player game are started, I create my “game” object and create a LoadingState that contains it. LoadingState is also an AppState and a ScreenController and its only job is to watch the game loading progress and report that to the nifty configured loading screen.

LoadingState, creates the GameAppState, adds it to the StateManager, and watches it load. Once the app is fully loaded, LoadingState removes itself and takes down the nifty GUI.

Now the user is playing.

Nifty is really powerful and has a lot of really cool stuff built in. It can be a little difficult to approach because of the state of the 1.3 documentation but I still think it’s ultimately probably worth it.

I plan to strip the above described code down into a simple example and put this up somewhere (minus my game, of course). I don’t know if it’s the “prescribed” approach but it was a very clean separation and required minimal code.

thanks both for the information so far :smiley:

Glad that people giving their input.

Also pspeed if you put up tuts I would be glad if you could give me a link then whenever or if you ever put some up :smiley: