you're reading...

XNA getting back to basics?

The latest post from the XNA team talks about what the XNA framework and components of it.

Most importantly for the beginner is the sample code at the end which sets up a very simple app.

*cue wavy screen effect*

As I mentioned before, I got into programming because I wanted to make games. I started with simplistic QBasic games, then moved on to non-gaming stuff when I discovered VB, then back to games to learn C when I found the Allegro library.

Ah….Allegro. I can’t remember exactly what version of Allegro was out at the time, but I do recall that it was still focused on just DOS development. Fortunately Windows 9x didn’t stand in the way of letting the DOS code work just fine. Thus I began learning C little by little making small projects here and there with Allegro.

You see, the beauty of Allegro at the time was that because it was just a DOS program you didn’t have to worry about windows messages, how to correctly interpret the various messages, and because it ran full screen you had full reign on what you wanted to do. Even better, Allegro was handling all the nasty stuff like speaking to the hardware and using interrupts for keyboard, timers, and video timing.

I don’t remember why I stopped using Allegro, I was fairly involved with the WIP builds for Windows that started using DirectX…maybe it was because I was getting into web development?

At any rate, I eventually went on to doing regular windows development, did a couple game like projects in MFC, but desired the simplicity I had when working with Allegro. I also looked at DirectX, but that brought another nasty with it…COM. I think at this time I hadn’t yet really understood pointers…I just used whichever . or -> caused intellisense to work. (Yes, I understand pointers now…I figured that out while taking a shower and thinking about some Q3 mod code)

*wavy screen effect*

So back to XNA, I mentioned the sample code before which I’ve also included below.

public class SampleGame : Game
    private GraphicsComponent graphics;
    public SampleGame()
        this.graphics = new GraphicsComponent();
    protected override void Update()
    protected override void Draw()
    static void Main(string[] args)
        using (SampleGame game = new SampleGame())

The first thing I notice is the simplicity. My hope is that everything stays simple as you begin to add more components and demand more out of the framework.

For example:

  1. What kind of magic do you need to go through to have the keyboard act like both a game controller and in other cases like a character input device?
  2. Is the default game loop based on a timer to provide consistant update rates today and 10 years from now? And the corallaries: If not, how hard is it to add? If so, can you change the update rate?

A friend and I both had the same thoughts after reading that post, and to quote him: “XNA will let me do what I’ve wanted to do, write games, not write the code that lets me write games”


About James

I am a Senior Developer/Consultant for InfoPlanIT, LLC. I previously spent over 7 years as a Product Manager for what eventually became ComponentOne, a division of GrapeCity. While there, I helped to create ActiveReports 7, GrapeCity ActiveAnalysis, and Data Dynamics Reports.


2 thoughts on “XNA getting back to basics?

  1. Hey, i remember Allegro! Wrote a scorched-earth clone using it “back in the day”… unfortunately, i got too interested trying to design the perfect animation scheduling framework and forgot to actually make it playable. Still, an amazingly fun framework to use.

    Posted by Shog9 | August 27, 2006, 1:42 pm
  2. I recently decided to take a look at XNA after getting the urge to start coding a game again.

    Like you I moved into web development and not really looked back since then but I remember Allegro as it was the first proper stint at coding something game-like and I managed to pull off a sideways scrolling shoot-em-up.

    XNA definitely reminds me of Allegro and I hope the simplicity and accessibility remain – you never know the dawn of the bedroom coder may emerge again hehe 😉

    Posted by Kermit | April 1, 2009, 11:58 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: