Gui Methods
by Jeff Trier · in Torque Game Engine · 07/22/2003 (1:49 pm) · 6 replies
Hi all,
I want to send a question to all those Gui-Guru's out there.
The game I am working on needs to support multiple HUD screens(Vehicle HUDs, Trooper HUDs, Command View HUDs, etc...).
My question is, what is the best way to approach this? Should I just use PlayGui and add a ton of components to it which get turned on and off in switching groups? Or should I create multiple TSctrl gui's, one for each HUD.
I know that both of these styles will work, but what is the best approach to minimize processing resources?
Thanks guys!
-Jeff
I want to send a question to all those Gui-Guru's out there.
The game I am working on needs to support multiple HUD screens(Vehicle HUDs, Trooper HUDs, Command View HUDs, etc...).
My question is, what is the best way to approach this? Should I just use PlayGui and add a ton of components to it which get turned on and off in switching groups? Or should I create multiple TSctrl gui's, one for each HUD.
I know that both of these styles will work, but what is the best approach to minimize processing resources?
Thanks guys!
-Jeff
About the author
Originally a Classical/Metal musician, I've always been attracted to anything involving computers, including: Networking, PC Building and Repair, software design and coding. I've been involved with game design and development for over 10 years.
#2
I would not have multiple PlayGui's
I would rather see multiple controls on the one PlayGui
and merely disable and enable them as you need them.
07/22/2003 (3:04 pm)
Umm..I would not have multiple PlayGui's
I would rather see multiple controls on the one PlayGui
and merely disable and enable them as you need them.
#3
Hehe, sounds like I hit an uncertainty... glad I asked.
Can you guys give pros and cons for your method? This should provide good insight for all of us.
-Jeff
EDIT: Spelling.
07/22/2003 (3:24 pm)
Thanks for the response guys. :)Hehe, sounds like I hit an uncertainty... glad I asked.
Can you guys give pros and cons for your method? This should provide good insight for all of us.
-Jeff
EDIT: Spelling.
#4
It's up to you. But I go for the clean implementation because of how much easier it'd be to add controls to a gui etc.
07/22/2003 (3:33 pm)
Sure. Anyone looking at the gui files will have a lot easier of a time understanding what is going on when you have a VechiclePlayGUI, FootPlayGUI etc. It will be a lot cleaner to look at in the scripts, and you won't have to muck around enabling and disabling gui controls. As far as overhead with switching GUI's I don't think it's all that much of a consideration.It's up to you. But I go for the clean implementation because of how much easier it'd be to add controls to a gui etc.
#5
07/22/2003 (5:18 pm)
Multiple GUIs are much easier to handle if you look at them in the scripts, like Pat said. You might also want to consider putting all files(scripts/graphics) needed for the GUI into a seperate folder like client/ui/VehiclePlayGui, client/ui/TrooperPlayGui.
#6
Thanks for the input guys!
-Jeff
07/23/2003 (7:08 am)
If it makese no difference performance wise, I will take the Multiple Gui route.Thanks for the input guys!
-Jeff
Torque 3D Owner Pat Wilson