Sunday, December 10, 2006

GUIs so far..

My first entry! ..well.. :)

I have been working on the menu(s) and the displaying.

The Main Menu and the game have non-identical game states.
So when you switch between them you actually switch between
these states. There is an overall Input Handler taking care of key actions.
The Main Menu's button actions are taken care of by the Main Menu itself.

The game states environment derives from jME (jMonkeyEngine)
and the GUI and its display are done with Fenggui which can
(more or less) easily be integrated in jME.

This is what the Main Menu looks like:


When you press the Escape button in the game,
the game state is changed and the menu gui is created
in this new game state. The Main Menu is displayed on top of the game.

The buttons are my own creation and can have -of course-
actions bound to them. Here is an example showing a simple
popup window that, well, pops up when you press the Play button:


Later -as you might have guessed- there will be another action
bound to the Play button. The Quit button closes the menu and
there already is a submenu when you press the Options button
including a Back button to go back to the Main Menu.

Once you are back in the game -respectively in the "in game state"-
you can press the N button to make the NPC menu show up:


At the moment this still is a small popup window but this will hopefully soon change to a menu-like communicative interface.
The NPC menu can not be opened when you are in the Main Menu
and in case that it is opened when you call the Main Menu it will be removed from the display.

Well, that's it so far from me..
If you want information on some tutorials that were a great help when
dealing with Fenggui/ jME and jME's game states and the buttons..
- just let me know :)

until next time: live long and prosper..

in case you wonder: the pics still show the old room version
but that should make no difference in terms of the menus ;)

No comments: