Documentation updated as of 07/27/2010

Version 2 brings alot of changes, and alot more features I think I can actually call it useful now!

In the older versions we had to manually update things such as keyboard input and other stuff. Not anymore!

Now all we have to do is add one line to our games constructor.
Components.add(new XnaHelpersComponent());
Now there are some overloads to this class.
XnaHelpersComponent(string GameName, Game game, GraphicsDeviceManager GraphicsDeviceManager)
This is the basic constructor, it will update input information based on platform, e.g. Mouse and keyboard on windows
and Gamepad and chatpad on Xbox.
XnaHelpersComponent(string GameName, Game game, GraphicsDeviceManager GraphicsDeviceManager, Color FrameRateCounterColor)
This constructor is identical to the first except it adds the FrameRateCounter game component and draws the framerate along with some other info in the specified color.
XnaHelpersComponent(string GameName, Game game, GraphicsDeviceManager GraphicsDeviceManager, bool UpdateKeyboardArg, bool UpdateMouseArg, bool UpdateGamePadArg)
This constructor works like the first one except it updates the keyboard, mouse, and gamepad depending on the boolean values. This works well if your using the Gamepad on a windows machine and need that updated along with the mouse and keyboard.
NOTE: Chatpad is updated along with gamepad because, 1 almost noone uses the chatpad, 2 you wouldn't be updating the chatpad without updating the gamepad as well!

Once you choose one of these constructors your basically set. It does every bit of updating for you. Now you have access to the following classes.

XnaHelpers
SoundHelper
InputHelper

Those are just the classes that REQUIRE the game component to run. Without it you can still use...

GuideHelper - easily my favorite addition to the library - note that if you do NOT implement the game component you need to update it yourself
FileWriter
FileReader
XmlWriter

All of these classes are static so you may use them anywhere. And best of all the game component does all of the work for you so you can reap the benefits!
You can still access these settings manually, virtually every variable is public so if you want you can bend them to your will.

There are a few other game components...
FrameRateCounter - independent of the XnaHelpers class and XnaHelpersComponent BUT it uses content that is embedded inside of the assembly so if you want to use it in your own project you need to change the font it loads and how it loads it. A very simple operation but just a warning;
InputComponent - Independent of the XnaHelpers class and XnaHelpersComponent, it's identical to the InputHelper only it doesn't need the XnaHelpersComponent to function. Another change to it, when using it you call the Input class instead of InputHelper. This should NOT be used if your using the XnaHelpersComponent since that component already supplies it to you.

That is a basic overview of some of the features and how to get a basic setup working, I will be adding more to this so keep an eye out! happy coding!

Index
XnaHelpers
InputHelper
GuideHelper
GamerServices
Conversion

Last edited Jul 27, 2010 at 9:50 PM by Destroyer229, version 12

Comments

No comments yet.