GoldenEye: Source Forums

  • November 28, 2024, 03:19:59 am
  • Welcome, Guest
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: March 05, 2008 - HUD Elements  (Read 18297 times)

0 Members and 1 Guest are viewing this topic.

Anthony

  • GES Plugin Coder
  • Secret Agent
  • **
  • Posts: 74
  • Reputation Power: 0
  • Anthony has no influence.
  • Offline Offline
March 05, 2008 - HUD Elements
« on: March 06, 2008, 06:06:13 am »

Hey guys,
You aren't going to believe it. Today, I actually programmed some code. Since HUD has been neglected in previous releases, I took some time to give it a head start. What exactly is HUD? Its all the fun stuff that you see while you play, such as the health bars, crosshairs, and the list goes on. Valve DOES indeed have a good HUD system, but they don't well document it and it requires some exploration before any coder can use it. Since Killer Monkey and I know our way around it, we figured the best way to utilize it would be create a base class for GE based HUD instead of just using Valve's factory code. So in order to create a new HUD element for GES, all we have to do is this:
Code: [Select]
class CGEHudTest : public CGEHudElement
{
    ...
    DECLARE_CLASS( CGEHudTest, CGEHudElement );
    ...
}
...
DECLARE_HUDELEMENT( CGEHudTest );

This is much simpler than what you normally have to do. Since CGEHudElement does all the harder work, just simply treating it as a parent makes CGEHudTest use all the in depth definitions without the extra work.

With this, we were able to start firing away at the HUD. Since the base class was a majority of todays work, I only got a single element implemented, but it worked like a charm. The crosshair is in-game and it works well :)

PS: I was fiddling around, health bar and armor bar are actually ready for implementation.
Your coder,
Anthony Iacono
Logged

CCsaint10

  • Nickname: "Saint"
  • 007
  • ****
  • Posts: 1,560
  • Reputation Power: 71
  • CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!
  • Offline Offline
Re: March 05, 2008 - HUD Elements
« Reply #1 on: March 06, 2008, 06:44:36 am »

Nice blog man! I love the fact that you got the crosshair going. That was something that needed some work in the last goldeneye version. Just make sure it pans when you move it too far over to either side or up and down..instead of just being stuck in the center like the last release. :) You're awesome man. Thank you for being an awesome programmer.

CCsaint10
Logged

Brings back memories, doesn't it? :D

VC

  • Valiant Varanidæ, Citrus Jockey
  • Retired Developer
  • GE:S Fanatic
  • *****
  • Posts: 2,843
  • Reputation Power: 16
  • VC is working their way up.VC is working their way up.VC is working their way up.
  • Offline Offline
Re: March 05, 2008 - HUD Elements
« Reply #2 on: March 06, 2008, 09:05:05 am »

You have my formula for properly filling the heath bars, correct? Yes.  Yes you do.

btw if you didn't catch the email yet, I think I found a CD mirror of Express 2005 in my pile 'o crap, so I should be covered.
Logged
"As for VC's scripts they have not broken the game at all, in fact the game has never felt better." -- KM
"(03:12:41 PM) KM: I would call you a no life loser, but you are useful"
"(03:12:59 PM) VC: Go ahead.  I am, and I am."

Mark [lodle]

  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,411
  • Reputation Power: 1
  • Mark [lodle] has no influence.
  • Offline Offline
Re: March 05, 2008 - HUD Elements
« Reply #3 on: March 09, 2008, 08:47:41 am »

Not very nice deleting my post because i disagreed with you.
Logged

Konrad Beerbaum

  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,343
  • Reputation Power: 1
  • Konrad Beerbaum has no influence.
  • Offline Offline
    • Konrad Beerbaum Online Portfolio
Re: March 05, 2008 - HUD Elements
« Reply #4 on: March 09, 2008, 09:25:33 am »

I moved the whole thread to the programmers section of the dev board so that we could discuss it further.
Logged
Konrad Beerbaum: Environment Artist
http://www.konradbeerbaum.com

Mark [lodle]

  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,411
  • Reputation Power: 1
  • Mark [lodle] has no influence.
  • Offline Offline
Re: March 05, 2008 - HUD Elements
« Reply #5 on: March 09, 2008, 09:38:58 am »

oh. :P
Logged

Loafie, Hero of Dreams

  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 4,066
  • Reputation Power: 1
  • Loafie, Hero of Dreams has no influence.
  • Offline Offline
Re: March 05, 2008 - HUD Elements
« Reply #6 on: March 09, 2008, 10:34:00 am »

the feeling was that your way was done correctly so its up for discussion :)
Logged
maps in production: ge_temple maps released: ge_caves, ge_complex, ge_complex_classic
Quote
Loafie, Hero of Dreams is watching Big Love
fourtecks: you are watching basstronix?
Pages: [1]   Go Up