Game Development Community

Main Menu Major Malpractice

by Chris "C2" Byars · in Torque Game Engine · 06/11/2006 (4:27 pm) · 18 replies

Alliterative, no?

How would it be even possible to make a menu layout like Quake 4's with the current GUI system? The way the relative sizing works (doesn't work) as of now prevents any type of menu other than one with fixed size text/buttons either centered on the screen or set a certain distance from each side.

Quake 4
ion-productions.com/game-main-menu.jpg
Try doing a layout like that in Torque and have it look fine at different resolutions. This type of layout was done in both Call of Duty games as well. I want to make a good looking graphical main menu system, one whose buttons are lined up perfectly where they should be in the background, so it flows smoothly; not one whose buttons are centered in a row.

However, I notice Wildlife Tycoon was able to do a menu like this..

ion-productions.com/wt.jpg

#1
06/11/2006 (4:33 pm)
As I remember, Venture Africa uses flash for the menus....
#2
06/11/2006 (4:34 pm)
That explains things. Wonder when relative sizing will be fixed.
#3
06/11/2006 (4:38 pm)
Relative sizing works, sort of, if you're careful. (and use bitmaps rather than text for your buttons).
#4
06/11/2006 (4:39 pm)
Something like the Quake 4 menu would be fairly easy to do in stock TGE. It just requires a little understanding of the best way to lay things out. Using GuiControl to group controls and making good use of width, height and relative sizing it's not too hard to do decent GUIs that resize well in TGE.

Of course, it's even easier to make something that looks and resizes like crap. But that's not a limitation of the system, just the user ;-)

T.
#5
06/11/2006 (5:00 pm)
Relative sizing has always worked well for me, What problems do you have with it?
#6
06/11/2006 (5:01 pm)
The problems described in the 2002 resource that supposedly fixes it; haven't tried it, it's rather old.
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2224

The items don't resize well, they skew slightly, even more so if you open and close the GUI Editor. Switching between resolutions and back cause the GUI objects to move around from their original positions.
#7
06/14/2006 (1:50 am)
The Quake 4 main menu is very possible. Just look at it and break it down into it's core parts. You pretty much have everything you need with stock TGE less a few changes to accomidate cosmetic needs. As far as the 'level in the background', you could get in-game realism with the TLK 3D Gui Object resource listed here:

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9981

You could stick a frame of that in the background rendering the scene with a little work and understanding of how to use the GUI control.

The great part about this resource is you don't need to 'launch a local server' to display the 'level in the background', either. Great if you don't want your users/clients (mmorpg / or like?) to have the abilitiy to do such a thing in their build of the software.
#8
06/14/2006 (2:36 am)
I haven't seen Quake4, but they probably aren't rendering levels in realtime on the menu and it's a canned movie sequence playing. At least I'd hope, I wouldn't want to be pushing the hardware like that on menu screens.
#9
06/14/2006 (3:14 am)
I don't get it, what's so special about the Quake 4 menu? I mean, what does it do that you can't do in Torque?
#10
06/14/2006 (3:40 am)
I think you just don't understand TGE's positioning of elements, which is a bit weird indeed, but it does work - the Quake 4 menu wouldn't be a problem at all.
Search on TDN or try to find Ed Maurina's PDF tutorials... or even better, get his book ;)
#11
06/14/2006 (5:37 am)
Actually, I do understand the positioning. My current menu has a layout similar to the above images, but they stay the same size, and cling a certain distance from the corners of the screen on resize. It's relative sizing that is flawed in the engine, which is why menus like Halo and Quake 4 don't stretch to fit the screen well.
#12
06/14/2006 (6:23 am)
Hm, you better post screenshots of your menu then, I still don't know whats the exact problem... didnt have any probs with relative sizing yet
#13
06/14/2006 (6:25 am)
Yeah I'd have to see that myself too.
#14
06/14/2006 (6:34 am)
Open the GUI Editor in 1024x768, and add a GuiBitmapControl with a 200x200 bitmap to it at "position = 500 200;", and set its sizing to be relative for both vertical and horizontal. Apply it and save. Close the GUI Editor and re-open it. Change the resolution to 640x480, then to 800x600, then back to the 1024x768 we started at. Take a look at its position and extent now. It's off.
#15
06/14/2006 (6:39 am)
That's because you're in the GUI Editor, which has bugs when resizing.
It's not a bug with the actual resolution or relative transform, it's the editor.

I never ever use it for the same reason.
#16
06/14/2006 (7:19 am)
Yes, this is ONLY an issue with the GUI editor. The way around this; DON'T change resolution in the editor! (at least NEVER save your .gui files after changing resolution).

What's happening is this; When you change the resolution some coordinates may get rounded to the closest integer, this will at most make things a pixel or two off (basically, it's not a problem, you won't ever notice). The problem comes when doing this in the editor; when you change the size the rounded number is saved and then when you change it back up to 1024x768 the numbers can be quite a bit off from what they originally were. In the game the numbers are as far as I know always based on the resolution specified in the .gui file so this will never happen.

Bottom line; relative sizing works just fine, you just have to (as I said in my first post) be careful when using the gui editor.
#17
06/14/2006 (7:48 am)
The Quake 4 GUI would be very easy yo do in TGE and TLK 1.4.
Magnus said it, Bottom line; relative sizing works just fine, you just have to (as I said in my first post) be careful when using the gui editor.
Somethings clear alot up for me is I plan my GUI out. I draw them out on paper and I make sure this what I want before I start. I also make a backup copy of my GUI if I plan on making any changes to it.
#18
06/14/2006 (5:22 pm)
Ah I was under the impression it was an all around bug. My mistake. Thanks.