Game Development Community

Setting up UI elements

by Russell Morgan · in TGB Platformer Kit · 06/08/2008 (10:55 am) · 7 replies

First off, I love this SDK and I'm having a ton of fun building my first level. It couldn't be easier to set things up and anyone sitting on the fence about buying this know it's fantastic.

That said, one thing I was curious about though is setting up the number of lives & damage meter gui elements. Is this something I should just be learning through the game builder documentation or is are there some built in aspects to the platform dev kit that will make this easier? If anyone knows any relevant tutorials for the above I'd love a link, it seems like all the GUI stuff on TDN covers Torque and not the game builder.

Thanks!

#1
06/08/2008 (1:47 pm)
Russell, thank you for the kind words! It is really encouraging to see so many people enjoying my work!

The GUI is a pretty simple system, but I haven't really seen too many tutorials on TDN. I would recommend that you check out the GUI page, it gives a broad overview of the GUI system itself:

tdn.garagegames.com/wiki/GUI

I think you should pay particular attention to the Profiles section. Once you get an understanding of profiles, you should just jump into the GUI Builder! When I first started playing with it, all I did was drag out buttons and bitmaps all over the place to see what things did during run-time. You'll get the hang of things pretty quickly, the most fiddley bit are profiles and how the object actually looks.

You can find how I handle GUI components inside of the "game/gui/mainScreen.gui" file and in the "game/gameScripts/PlayerMethods.cs" file as well. The two functions I use are "updateExtraLivesGui()" and "updateHealthGui()".

If you have any specific questions, feel free to fire them away!

Phil
#2
06/10/2008 (10:52 am)
Aha, this is starting to make sense, thanks very much for the link. Your GUI file makes sense when I open it in a text editor but I can't seem to get that file top open in the gui editor and show me the same controls. In fact the only profile that has anything in it is the test one I created from the TDN Wiki. I also get the impression the gui editor is a bit flakey...ah well.

Another question if you don't mind: I have a basic platform level up and running using the default assets. I've placed a bunch of pepper pickup objects but I've noticed that the majority of the time the last few pickups near the end of the level don't seem to be functioning (no collision occurs). The peppers are all the same, just a cut and paste from the original object. Should I be spawning these elements instead to be more resource friendly? Is that why the last bunch aren't reacting?
#3
06/10/2008 (3:33 pm)
You're probably suffering from the TGB 1.7.3 t2dTrigger issues. There should be a hotfix for that problem soon... I hope...
#4
06/11/2008 (8:43 am)
I wish that were the case, I'm still running 1.7.2. But let's not worry about it for now, I thought if maybe there was a quick answer off the top of your head that would be great. This is literally just a test level to get used to the way everything works so if the problem returns when I really get down to work I'll worry about it then.

Thanks again for the help, I'm having a blast with this software!
#5
06/19/2008 (6:56 pm)
Talkin about GUI's... do any of you guys know how to handle GUI skinning?... i've seen some pretty good stuff out there, but i've no idea on how to start doin it... help
#6
08/24/2008 (10:38 am)
Ok, finally went back to the GUI programming bit and I've across a snag: You have a GUI profile name "GuiExtraLifeCounter" that displays large white text. For the life of me I can't find that profile to edit the look and feel of the font! Any hint on where that would be would be great.
#7
12/07/2008 (7:42 pm)
That is one thing that kind of urked me is they didn't include a section for GUI elements such as the health bar. Oh well, more in the future I suppose.