ZFGC

Resources => Coding => Topic started by: Cassyblanca on December 21, 2008, 04:15:32 am

Title: [C#, XNA 3] Heads-Up Display Component Tutorial
Post by: Cassyblanca on December 21, 2008, 04:15:32 am
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 (http://files.minalien.com/HUD%20Tutorial.zip)
Title: Re: [C#, XNA 3] Heads-Up Display Component Tutorial
Post by: Rukiri on December 21, 2008, 05:21:58 am
Skimmed it, looks great!
Thanks^^
Title: Re: [C#, XNA 3] Heads-Up Display Component Tutorial
Post by: Cassyblanca on December 21, 2008, 05:31:23 am
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.
Title: Re: [C#, XNA 3] Heads-Up Display Component Tutorial
Post by: Rukiri on December 21, 2008, 06:50:31 am
Well a quarter is .25 so just make a sprite sheet of 5, 1=1, .75=75% etc.
Title: Re: [C#, XNA 3] Heads-Up Display Component Tutorial
Post by: Mamoruanime on December 26, 2008, 01:15:26 am
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
Title: Re: [C#, XNA 3] Heads-Up Display Component Tutorial
Post by: wildex999 on December 26, 2008, 01:24:33 am
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


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