This project is read-only.

HUD Component(s)

Jan 26, 2008 at 12:42 PM
I am pretty new to Xna 2.0, yet alone 3D game development, however I have been trying to learn it in any free time I may have. So far everything is going well. I came across this engine a week ago whilst looking into xna 2.0.

Since then I have been learning and understanding the code and finding ways to add/improve existing code etc as a bit of a learning curve. Your HUD component was good, I liked it. However it did only have one HUD Message type. Therefore I decided to re-write most of it.

My version of the HUD Component stands with the following HUD Message Types...

HUD Message (XY parameters for positioning on the screen)
HUD CenterMsg (No XY parameters, This is a message centred on the screen)
HUD Hint (Like in valve source games this is a little message centred at bottom of the screen)
HUD Advert (With most games, any plugin that allows servers to show advert messages are usually shown top left - As does this!)
HUD Chat (This is a chat box bottom left of the screen, it shows up to "MAX" messages pushing the one before it up. Currently set to 4)

HUD Chat allows you to add messages to it which are displayed newest at the bottom pushing the others up, if maximum chat msgs reached then the oldest is removed and newest added.

All, with exception to HUDChat and HUDAdvert allow you to use an image instead of a message. All messages can have something which is called a boxStyle. If any of you have seen any AMX plugins for any sort of game or even valve source games the HUD messages always have a darkish rounded box behind the text.

This is set to false by default, but if you wish to you boxStyle then each HUD.create.... command has a override parameter where you can set boxStyle to true.

If you, the team working on this engine, are interested then please respond as I would love to send you the new HUD stuff (Includes code line changes where needed in the main code. Where you create HUD messages and some HUD constants to be added/changed in CommanVars.cs

Many Thanks, Shane

ps: I am working on some more HUD stuff, not just messages. However since this is all new to me please bare in mind the stuff I have planned may never get done, either that or be very slow. I am working on it the best I can however! ;P
Jan 26, 2008 at 4:18 PM
Edited Jan 26, 2008 at 4:19 PM
You can upload it as a patch and we can apply it and be able to see it that way. There should be a source code tab at the top of the screen, and within that you'll see an upload patch option.

To create a patch you'll need cpc. Go to the root directory of the engine and type 'cpc makepatch patchnamegoeshere.patch'

Sounds pretty cool, I won't be around the code for a few days to check it out though. I'm sure Sturm will sift through it and tear it apart like he does everything else.
Jan 26, 2008 at 4:35 PM
We'd be glad to take a look at it. We hadn't planned on implemented much in the way of HUD functionality for another version or two but a head start never hurts.

I'd be interested in seeing what you liked and didn't like about the engine structure.
Jan 26, 2008 at 4:58 PM
As far as the structure goes, as well as the comments...Brilliant.

As I've said before I haven't been doing this long, but I can definately say I understand almost everything coded, why and how it works. The structure of the files along with the regions helps me understand things quicker and makes things easier when coming around to editing or adding something.
The comments give enough details about certain things I am unsure about also.

As far as adding it to the source tab as a patch update...
I am uncertain what you mean by the term 'cpc', could you explain this a little bit please?

ps: I have to go to work tonight 18:00-21:00 :( - Sigh, However, after, when I am back I will certainly be up for coding etc... And will upload the code once i know what the term 'cpc' is.

Just a add-on to what HUD elements I had mentioned before...

HUD Menu

This is not ready to be uploaded. However I am working on creating HUD Menus whereby you can show the client/player a Text based list menu with numbers for the options. The first release of it will only allow one page of options... 0-9, usually 0 being exit. Will have time-outs and a menu que, since only one menu can be shown at one time.

This is on its way! :D

Jan 26, 2008 at 5:11 PM
cpc is the code-plex client. It allows you to download the versioned source code from the source code section, and merge and edit with it. It can create patches with others can download, so rather than upload your entire project, the patch simply puts your changes into effect on someone elses code.
Jan 26, 2008 at 10:07 PM
Thank you very much for explaining that for me mate, I will do it know :D
Jan 27, 2008 at 4:04 AM
No problem. If you're having trouble finding it, I believe Sturm included a version of it in the source code download. If not, you can do a search for codeplex client in the search bar of this site and it should take you to it. It can be slightly frustrating at first, but it's really not so bad once you've used it a couple of times.
Jan 27, 2008 at 9:06 AM
You can say that again.

I downloaded it followed the instructions and only just got the latest source downloaded now. (Takes forever)

What confused me is that I downloaded and understood the Release Version 0.182b which was a nice set of files. forexample the structure for HUD was...


Now however I look at it and am completely confused and lost! :(
Jan 27, 2008 at 1:23 PM
When you get the source tree you aren't working with only the 0.182b release. We are currently working on rewriting everything, this also goes for the source tree stucture. We are now working on the 0.19 release which is a complete rewrite of the engine and this is the project available at the root of the source tree.

If you want to work with the 0.182b code you need to go to the following path inside the source tree:

framework\Template\QuickStart Engine\QuickStart Engine\Code\Components

The 0.182b is the last version of what we call the template engine and will be discontinued from the release of 0.19 which we call the QuickStart Engine. This is very confusing, but moving forward we are going to remove both the Template and the prototype code leaving only the QuickStart Engine.

I hope this helps, otherwise feel free to ask.
Jan 27, 2008 at 2:04 PM
I had a look at the code and I think for the 0.182b engine the code is fine. But moving forward I think you have to rewise most of your code. You should look into the new engine and take a closer look at Debug/FPS Screen and Screens generally.

If you want to contribute to the engine I suggest you have a look at the Coding Guidelines (available at the main page), and also feel free to look at the Microsoft Guidelines for writing frameworks, and IDesigns coding guidelines.