Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

XNA and GameComponents

XNA and GameComponents

Rob Loach
Reminiscence · · 1 min read
2,218 1
After a bit of fooling around in XNA a bit, I (almost) made an XNA renderer for CeGuiSharp. There's still a bunch wrong with it and I'm not quite sure that I'll continue to hack at it. CeGuiSharp is such a mess and it's almost worth a complete rewrite from scratch with a new design. But you can see what came out from CeGuiSharp through XNA on the right (click to enlarge).

Another thing I've discovered is the use of GameComponents with XNA technology. You have the ability to drag these components onto the designer and then the components will automatically start-up, update and draw for you without you haven't to code anything. It's pretty neat and making them is rather fun. I had a try at it with making a couple of them:
  • BitmapFont
    Once you give the BitmapFont the data file and image file generated from LMNOpc Bitmap Font Builder, you have the ability to easily draw text on the screen.
  • Framerate
    Using a BitmapFont for rendering, the Framerate component will tell you how fast your application is running
  • Input
    A bad thing about the XNA input framework is that it doesn't provide events to any of the input methods so you're left to instantiating KeyboardState, MouseState, GamePadState, etc. The Input component fixes this by providing a number of user input events (KeyDown, KeyUp, MouseMove, GamePadButtonDown, etc).
I'll get around to making a game using these components and publish the source. Maybe a Snake clone because I haven't done one of those yet.....

Random Interest

Dubbed Power Rangers, Bitch

Discussion

Loading comments...