Author Topic: How to make a HUD?  (Read 6709 times)

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
How to make a HUD?
« 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??

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: How to make a HUD?
« Reply #1 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.

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: How to make a HUD?
« Reply #2 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)
Nada por ahora

Offline Jonas

  • byte
  • *
  • Posts: 41
    • View Profile
Re: How to make a HUD?
« Reply #3 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.
Simple things should be simple, complex things should be possible - Alan Kay

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: How to make a HUD?
« Reply #4 on: August 25, 2008, 01:09:40 am »
How would you put a FengGUI onto the jpct window?
« Last Edit: August 25, 2008, 01:49:05 am by Disastorm »

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Re: How to make a HUD?
« Reply #5 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.
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG