Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Cool GUI shape ideas?

Author
Message
Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 6th Mar 2006 04:24 Edited at: 6th Mar 2006 04:51
Im trying to create my gui/hud, but dont want to use the standard rectangular health bars ect... Anyone have tips for creating unique looking gui elements, like rings/odd shapes for health, ect...

In a nutshell I just want more curved, non square elements/bars.

*edit for example imagine a crescent moon shape, that would 'fill' with color from bottom to top. It seems it would require a alpha map in the shape you want, then another sprite BEHIND the alpha map (represnting 'color'). You scale/move the 'color' sprite to represnt health/whatever, but its only visible through the window of the alpha map. Yeah...

All you need is zeal
Oddmind
20
Years of Service
User Offline
Joined: 20th Jun 2004
Location: Atlanta, Georgia
Posted: 6th Mar 2006 04:56
well what kind of game is it for?

formerly KrazyJimmy
Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 6th Mar 2006 05:33 Edited at: 6th Mar 2006 05:36
Non rectangular bars could be used in any genre, doesnt matter. But just for fun lets say its a health/mana bar for a MMORPGZOR!@!!11one!!1

*edit seriously though, ive always wondered how they do seemingly simple things like the spheres in diablo. I mean, how do they 'fill' the spheres with red/blue? They have to use some alphamap like I mentioned, but how could you do that in dbpro with simple sprites?

All you need is zeal
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 6th Mar 2006 05:56
Quote: "like the spheres in diablo."

easy.

basically:
you have the empty sphere looking image.
then you get the player health %

then

for i = 0 to plrPct
draw line

that's the basics of it :p


This just in: White lab coats cause cancer in mice. Details comming soon.
Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 6th Mar 2006 06:33
That seems very slow... drawing lines..

All you need is zeal
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 6th Mar 2006 06:35 Edited at: 6th Mar 2006 06:41
Well if you don't want to draw lines for the sphere you would need one image that is the area surrounding the circle with the circle cut out via alpha mapping of the image, and you'd need an image of the sphere that's full which you put UNDER the circle cutout so that it looks like it's full, and finally you'd need a third image, probably jet black, to cover up the fill image and you could scale the black plain up to reveal the hidden area.

That's a simple way at least.You could just make it an AVI file rendered in a 3d program and play certain frames.

Or for kind of an unique look you could just texture a sphere, lock it on screen, and rotate it down when the player loses health.

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 6th Mar 2006 07:27
The whole multiple scrolling layers wouldnt work cause then you would have black square 'background', exactly what im trying to avoid.

I like your idea about rotating a sphere though, thats the kind of clever stuff im talking about. I thought about rotating sprites to get a sort of 'arc' effect, but it would only work for 180 degrees.

All you need is zeal
Hobgoblin Lord
19
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 6th Mar 2006 11:58 Edited at: 6th Mar 2006 12:00
I Would suggest the following; have a preloaded sprite for the sphere that is hidden off screen and a preloaded image for the "fill" of the sphere. Draw the "fill", draw a black box(or whatever your transparent color is) over the image to reduce the fill to where it needs to be, paste the sprite of your Sphere over the other two then GET IMAGE and assign it to the sprite that actually shows on the screen.
Redostrike
22
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 6th Mar 2006 12:41 Edited at: 6th Mar 2006 12:42
Or create the health"circle". Then another circle whit the transparent color in the middel of it whit the radious of the health(when the health is 100% there is no circle).

For good 2d: http://www.eyeball-design.com/index3.htm (tutorials photoshop)

Only heroes live forever.
Beatboxing Rulllllllllllzzzzzzzzzzzzz
www.redostrike.tk (Anime site trade availible)
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 6th Mar 2006 14:44
u could also make an animated sprite.
Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 7th Mar 2006 03:26
@hobgoblin

dont think get image would work very well, you would loose the alpha channel so your transparency would look like crap.

@david

would need MANY frames for smooth animation though

All you need is zeal
driftman
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: Somewhere Outside of Sanity
Posted: 7th Mar 2006 07:53 Edited at: 7th Mar 2006 07:55
my guess, as far as the diablo thing, would be:


but that's just my shot at it.

[edit]
just fixed a mistake i made...

I have a lil' white jacket that lets me hug myself forever.

Login to post a reply

Server time is: 2025-06-06 16:14:11
Your offset time is: 2025-06-06 16:14:11