StarFight

This is an old post and doesn't necessarily reflect my current thinking on a topic, and some links or images may not work. The text is preserved here for posterity.

Over the Christmas break, my little brother Andrew and I got together and experimented with building games for the Xbox 360 with the XNA framework. We ended up building a game called StarFight. It started as a clone of Asteroids, until we found that killing each other was more interesting than killing big space rocks.

Star Fight in action - here you can see me kicking Andrew's butt

The Xbox 360 controllers have two thumb-sticks. In our game, the left thumb-stick controls movement of the ship, while the right thumb-stick controls the direction the ship is facing. The right trigger button fires the ships cannon.

We also added boosters, which randomly appear and give the player who picks them up a special bonus. Here you can see Andrew picking up a health boost - I think I'm in trouble:

Andrew picked up a health boost

Publishing the game to the app store

I find the game quite fun to play, and I'm curious to see if anyone else does. We've submitted the game to the XNA Creators Club - there, it will be peer reviewed before being published to the Xbox 360 indie app store. I've never published anything to an app store before, so I'm curious to see how the process goes.

Open source

We submitted the game to the app store, but the primary reason for that is so other people can play it (there's no "free" option on the store, and there's no way to play XNA games on the Xbox without buying them from the marketplace or having an XNA creators club membership). But if anyone is interested, the source code to the game is at BitBucket.

On Learning XNA

XNA is a very nice framework, and does a good job of straddling the line between making life easy and avoiding leaky abstractions. It handles a lot of the complexity of loading and converting content (textures, 3D models, etc.), but most of the code you write still comes back to triangles, vectors, matrices and trigonometry. All you need to get started with XNA for PC games is the XNA Game Studio 4.0, which is free.

On Xbox Development

I'd been writing a few XNA applications for PC, and making them run on Xbox was very easy. First, you'll need to fork out some cash for an XNA Creators Club membership. Once you've done that, install the XNA Game Studio Connector onto your Xbox.

Your PC can then connect to the Xbox via the XNA Game Studio device center. The debugging experience is fantastic - just hit F5 in Visual Studio and the game will be deployed and run on your Xbox in no time.

On Australia

The recent Hanselminutes podcast is what got me into using XNA for Xbox games. While I always thought of the Xbox as a platform for large corporations to publish major game titles, the Indie store makes it more like an app store.

The Indie game store relies on peer review to establish ratings (G, PG, M15+, for example). That's fine in the USA and other countries, but in Australia apparently it's not allowed. Since games are required to be rated before being sold in Australia, the indie game store isn't available here. That's a real shame.

The funny side to this is that as an Australian, I can develop and publish an Xbox game for people in other countries to play, but I can't download and play it myself.

More links