Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [C#, XNA 3] Heads-Up Display Component Tutorial  (Read 5153 times)

0 Members and 1 Guest are viewing this topic.
[C#, XNA 3] Heads-Up Display Component Tutorial
« on: December 21, 2008, 04:15:32 am »
  • Minalien
  • *
  • Reputation: +10/-1
  • Offline Offline
  • Gender: Female
  • Posts: 2119
Well, I've completed another tutorial. This one isn't related to my earlier tutorial series, and we're still waiting to see what goes on with my ZFGC University proposal before I continue that.

In the mean time, enjoy this tutorial on the creation of a heads up display component for your games.



Target
This tutorial targets those working on a two-dimensional game, though three-dimensional games rendering their heads-up display as two-dimensional sprites will work fine with this tutorial. It assumes basic knowledge of C# and XNA.

Covers
Heart-on, Heart-off health system. This system uses a health system that goes with a heart-per-hit-point approach.
Mana Bar magic system. This system creates a "magic bar" of specified dimensions to show a player's remaining percentage of magic.
Wallet system. This has a wallet system that uses an image for a wallet and a sprite font to display the number of coins in the player's wallet.
Buttons system. This shows action buttons, with associated action, weapon, or item.

Content
I created the images in this tutorial on my own, with the use of Microsoft Expression Blend 2. You may use them freely, though they are of admittedly low quality.

Mirrors
(ZFGC - PDF ONLY) - http://www.zfgc.com/forum/index.php?action=dlattach;topic=32778.0;attach=4956
(ZFGC - DOCX ONLY) - http://www.zfgc.com/forum/index.php?action=dlattach;topic=32778.0;attach=4957
(ZFGC - ENTIRE) - http://www.zfgc.com/forum/index.php?action=dlattach;topic=32778.0;attach=4958
(Minalien.com - ENTIRE) http://files.minalien.com/HUD%20Tutorial.zip
Logged
Quote
There's such a double standard about religion in the modern world. Catholics can gather, wear white robes, and say "In nomine Patris, et Filii, et Spiritus Sancti" and be considered normal.

But if my friends and I gather, wear black robes, and say  "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn", we're considered cultists.
  • Development Blog
Re: [C#, XNA 3] Heads-Up Display Component Tutor...
« Reply #1 on: December 21, 2008, 05:21:58 am »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
Skimmed it, looks great!
Thanks^^
Logged
Re: [C#, XNA 3] Heads-Up Display Component Tutor...
« Reply #2 on: December 21, 2008, 05:31:23 am »
  • Minalien
  • *
  • Reputation: +10/-1
  • Offline Offline
  • Gender: Female
  • Posts: 2119
You're welcome. If you can't figure out how to get a four-quarter heart system working, let me know. I can write a supplementary tutorial on converting.
Logged
Quote
There's such a double standard about religion in the modern world. Catholics can gather, wear white robes, and say "In nomine Patris, et Filii, et Spiritus Sancti" and be considered normal.

But if my friends and I gather, wear black robes, and say  "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn", we're considered cultists.
  • Development Blog
Re: [C#, XNA 3] Heads-Up Display Component Tutor...
« Reply #3 on: December 21, 2008, 06:50:31 am »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
Well a quarter is .25 so just make a sprite sheet of 5, 1=1, .75=75% etc.
Logged

Mamoruanime

@Mamoruanime
Re: [C#, XNA 3] Heads-Up Display Component Tutor...
« Reply #4 on: December 26, 2008, 01:15:26 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
Great work as always MiN ^_^

I'm still incredibly new to C#, and it's nice to see tutorials that kind of gradually ween me into the language, as well as the OoP practices :D
« Last Edit: December 26, 2008, 01:28:51 am by Mamoruanime »
Logged
Re: [C#, XNA 3] Heads-Up Display Component Tutor...
« Reply #5 on: December 26, 2008, 01:24:33 am »
  • The devil in the mirror.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 238
Whoa, nice tutorial :D
Nicely commented code(not too much, but explains what it needs to)
And a nice tutorial text ;)
I'm going to start using a bit of C# soon too, and I can see that these tutorials can be a great help when that time comes :D

Logged
Working on my Masters Degree in Computer Science.
Hey look, Zelda Coop....later.
Proud user of C++ for 9 years, and counting!
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.087 seconds with 46 queries.