Teen Programmers Unite  
 

 

Return to forum top

Creating Extensive Menu Systems

Posted by RedBaron [send private reply] at April 20, 2001, 08:20:34 PM

I've been trying to work on the mid/most important piece of a simple top down turn-based dungeon crawl game for awhile. I however am stalled in having to create a semi-advanced GUI system(IMO) for the entire thing. I'm hoping to have your average opening menu with new(resume)/load/save/exit, Then I have to create a character creation step which would be similarily set up to the Bioware RPG character creations, then in game you have the map screen(default) with a few options to choose from in a sidebar (amongst them a character view, big map view, non-combat spell casting). In combat I would have a simple FF8 style method of choosing actions (only combat turn-based so I don't have to worry about timing too much). Then finally is an entire 'town' menu (when you finish the dungeon you can return to town and gain levels/more if I feel like turning it into an actual RPG).

The complexity involved in creating this system of menus astounds me, and the closest help/tutorial I found involved finite state machines (shudder) and creating an app specifically for creating the scripted GUI for a particular screen.

Is there any easier way to do this or am I in over my head?

Posted by FatBoi [send private reply] at April 21, 2001, 09:58:04 PM

Actually, you do have to do it somewhat like you stated. However, you can inplement a hard-coded menu system that would require little implementation code any different from your code for processing mouse input from your game. To check to see if a mouse click landed on an object drawn on the screen, you clip the mouse coords against the objects visual representation. This is usually a rectangle, though you could go ahead and check the actual transformed pixel location. You would do the same thing for a menu, you just load a new menu/action resulting from the menu interface rather (as opposed to selecting the unit the player clicked on). If you don't want to hard code it, you could create a menu-interface scripting engine.

Posted by miken [send private reply] at April 22, 2001, 11:21:23 AM

Unfortunately, GUIs are a bit problematic. I take a Windows-style approach with mine: make a subroutine for each "control" that will draw it, test to see if it is in the clickable region, etc. Next, just make a script in a file with the coordinates, properties, etc. of the controls for a screen. Then just have a linked list containing every control on the screen for a form and just loop through each control every frame, testing for mouse clicks, mouse-activated regions, etc. There isn't really an easy way.

Mike [mnansgar@hotmail.com]

Posted by Psion [send private reply] at April 22, 2001, 12:57:19 PM

I think you may be in over your head if you don't know how to do this. There is nothing complex in how the GUI's you know and love work in so far as detecting button/menu item clicks. You should take a while to think about, given user input events, how YOU would manually determine what should happen, and the rest should follow.

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.