www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Disastorm on August 23, 2008, 07:00:09 pm

Title: How to make a HUD?
Post by: Disastorm on August 23, 2008, 07:00:09 pm
Is there any classes or anything that let you make a HUD like in-game text windows, Health Bars, Skill buttons, etc??
Title: Re: How to make a HUD?
Post by: EgonOlsen on August 23, 2008, 09:58:40 pm
In the util-package, there's the Overlay-class that does something like that. Either use that or do a (scaled) blit from a texture. Don't use the blit-methods that are taking an int[] unless you are limited to software rendering anyway. They are quite slow in hardware.
Title: Re: How to make a HUD?
Post by: Melssj5 on August 23, 2008, 11:49:28 pm
I make it using the blitting methods. But my HUD is not a great thing. a Radar, a crosshair, 2 life meters (one graphical and one using numbers)
Title: Re: How to make a HUD?
Post by: Jonas on August 24, 2008, 09:46:56 am
If your using software mode you could use Swing/Awt to make GUI's too.

In hardware mode that is a bit more tricky..I think Fenggui is pretty easy to use for basic GUI stuff then.

Of course, if you only need lifebars/other simple stuff then drawing them using an Overlay is probably the most simple approach.
Title: Re: How to make a HUD?
Post by: Disastorm on August 25, 2008, 01:09:40 am
How would you put a FengGUI onto the jpct window?
Title: Re: How to make a HUD?
Post by: cyberkilla on August 25, 2008, 02:32:53 pm
How would you put a FengGUI onto the jpct window?

I believe that they have documentation on their website.