Game Development Community

guiSkinnedProgressBar. Wait, what?

by Rob Parton · 07/29/2006 (8:03 pm) · 8 comments


I browsed GarageGames
To find a skinned progress bar
I did not find one


Now that I have the haiku out of the way, the story goes like this:

I am screwing around with Torque, trying to implement a number of different GUI ideas for my own little amusement. I decided I wanted to do an MMORPG interface, just to tickle my fancy. Nothing big. Just some health bars, ability icons and the like.

However, I was surprised to find that there wasn't an easily usable skinned progress bar. Hell, I couldn't find one at all.

Now, I haven't coded a heck of a lot since I left high school in 1999. I'll admit I'm beyond rusty, but I figured this would be a good little project. Thus, guiSkinnedProgressBar is a reality. Sort of.

www.zodiac-braves.com/torque/devshots/guiSkinnedProgressBar1.png
The code is fairly simple, and once I add some features to it, I'm going to post it as a resource. However, I can't reiterate how shocked I am that I couldn't find one already. You'd think someone would have done this already and that it'd be in HEAD by now. o_O

Currently it only has a background and bar textures. It stretches the center texture like a GuiWindowCtrl does. I want to add the ability to make it instead tile the texture instead, as well as add some other capabilities that I'm not totally sure about yet (vertical progress bars / gauges would be nice).

This is the skin used for the above example:
www.zodiac-braves.com/torque/devshots/guiSkinnedProgressBar2.png
This was about four hours spent to come up with this, after not really coding anything on my own in C++ for years. I am quite pleased with myself on this!

Any thoughts or suggestions on what to add, now that the core functionality works?


Edit: Throwing up some examples as I go...

the original progress bar along with two others, one of them very Guild Wars-esque
www.zodiac-braves.com/torque/devshots/guiSkinnedProgressBar3.png

#1
07/29/2006 (8:25 pm)
Pretty cool feature Rob, I think a lot of people would like to see something like this, for heathbars and all.
#2
07/29/2006 (10:47 pm)
Ha, neat. Definitely surprised this wasn't already a resource. Way to impliment. :)
#3
07/29/2006 (11:16 pm)
Cool.

Small change from an artist's perspective: It would be better to have the layout of the divided up image a little different. With the current layout, when you go from Photoshop mockup to final art, you have to cut the chunk off the end and then move it over, then move the center part over to the right. It gets tedious if you have to do it a couple times after making changes to get the art looking just right.

It's much simpler to put the center part that stretches in the center of the divided up image. This way when the artist goes from the mockup to the final image, all they have to do is add the red lines on top of it.

ezupa.com/gg/guiSkinnedProgressBar.jpg
#4
07/29/2006 (11:31 pm)
Looks very nice and useful! Nice work
#5
07/29/2006 (11:47 pm)
@Matt:
I was thinking Health bars mainly, actually. It has a lot of uses, I think.

@Mark:
I was already thinking about that for when I post it as a resource. Just doing the few I did this afternoon, and I can already tell it would be the best idea.
#7
07/30/2006 (2:42 am)
@Ryan:
Cool! It's nice to see it, I guess I missed it when I was looking around. (probably because I wasn't looking for health, i was looking for progress bars *shrug*) Your implementation looks kinda neat, I will sit down with it tomorrow and play around with it.

In any case, this is good practice for me. I'm not much of a coder, I just try to fill gaps when I can when I need something for my interface work.
#8
07/30/2006 (9:53 pm)
It was for some of those reasons that I created the guiIMGHealthBar. I need something to do to learn about the inner workings of torque. I had seen several post about the limitations of the health/energy bar for design and decided to make one that supported images, from there it went to supporting animations. I wanted to be able to show health/energy as something other that a bar. It was fun to do, I just need to finish up end cap support and then a TSE port. Good job on what you have done, I like to see people creating gui elements, the more the better.