Disco Justice

Over the long weekend, I decided to have a stab at programming an Xbox 360. Don’t judge me, this is what I do with spare time.

I’ve never thought I’m particularly great at programming. However much I know, there’s always more to learn. A few years ago, I passed a tipping point where the new stuff began to get easier to take in, and I began to feel like there wasn’t anything that I couldn’t eventually figure out.

I’ve been doing web development during those last few years, and it has pushed out all the other things I used to play with. I used to make 3d games - well, 3d games engines that did nice stuff, but weren’t actually games. If I knew how to make compelling games, I’d probably have turned them into games. But since it was kind of a dead-end hobby, I spent less time on it.

Enter the Xbox 360, with it’s XNA development environment. It’s a huge step up from the environment I used for 3d stuff before, which was the humble but versatile Blitz3D. I’m getting that feeling of being a beginner all over again.

I forgot how bad I was at maths, and forgot how much of it was needed for 3d programming. In the past four days, I’ve shovelled all sorts of knowledge into my brain. I knew what Matrices were, but not how they pertained to 3d graphics. Well, now I do. Quaternions. Ever heard of those? Me neither. Until now. Changing the colour of something now takes about 10 lines, where it used to take just one in Blitz3D. I don’t position objects in 3d space anymore, I apply translation and rotation matrices to them.

It’s scary stuff, so why persevere? A few reasons:

1) If I want to keep programming in 3D, the already aged Blitz3D simple won’t be around forever. XNA is, for now, current, and regularly updated.

2) I don’t want it to beat me. If I can figure this out, then I’ll have a foot in the door.

3) C# is a really nice language. Blitz3D was great, you could do anything in it, but it’s like programming with boxing gloves on sometimes.

4) If I ever finish something (which I can guarantee I won’t), Microsoft allow developers to upload their game onto an area of the Xbox Dashboard, under “Indie Games” for the entire world to see and downlaod for their Xbox. I’ve always wanted to write something for a games console, so XNA offers quite a nice carrot in this respect. It also offers a giant stick labelled with things I don’t understand, and beats me with it.

Finally, I’m actually making progress. In just a few hours, I had something moving around and controlled by an Xbox360 gamepad. Considering I’d never programmed anything in C# before, or used the XNA framework, that’s kind of a testament to just how good a development environment it is, and that’s seriously encouraging.

  1. discojustice posted this