GUI Methods
by StandardFace · in Torque Game Builder · 06/30/2009 (6:24 pm) · 3 replies
What are the benefits/reason behind adding in your menu system from the GUI builder as opposed to just using images as buttons and linking them to a onMouseDown() function?
One thing that comes to mind for me is that you wouldn't be able to access a pause menu or something like that, but if i don't plan to allow my game to be paused, then why do i need it?
So In my line of thinking my game would be something like this.
Level loads, displays my main menu image as the background. Images, "buttons," are on layers above it that are certain classes that run functions when clicked. These functions would load the game level or end the game appropriately, etc.
Is this a terrible way to set up a game, or do I have TGB all wrong and basically however you want to do it is ok?
-SF
One thing that comes to mind for me is that you wouldn't be able to access a pause menu or something like that, but if i don't plan to allow my game to be paused, then why do i need it?
So In my line of thinking my game would be something like this.
Level loads, displays my main menu image as the background. Images, "buttons," are on layers above it that are certain classes that run functions when clicked. These functions would load the game level or end the game appropriately, etc.
Is this a terrible way to set up a game, or do I have TGB all wrong and basically however you want to do it is ok?
-SF
About the author
#2
-SF
06/30/2009 (7:17 pm)
Thanks for your opinion Nikos, it helps me make a decision. I might do it another way if I make changes to the game later or something, but this seems like the easier and more customizable way like you suggest.-SF
#3
The GUI system is reasonable, pretty easy to use but lacks documentation. Getting a basic GUI up and running with buttons and images, etc is really easy.
Using scene objects will give you much more flexability, but you're going to have to program a lot of functionality yourself.
If the Platformer Kit Demo I went with a GUI overlay with some scene magic in the background there. I definitely overcomplicated my menu scripts though, they are nasty!
07/01/2009 (1:59 am)
There is no *one* best method for setting up a menu for your game, it is really going to depend on what you want to do with it that matters. Though, each method does have its ups and downs.The GUI system is reasonable, pretty easy to use but lacks documentation. Getting a basic GUI up and running with buttons and images, etc is really easy.
Using scene objects will give you much more flexability, but you're going to have to program a lot of functionality yourself.
If the Platformer Kit Demo I went with a GUI overlay with some scene magic in the background there. I definitely overcomplicated my menu scripts though, they are nasty!
Torque Owner Nikos Beck