March 31, 2006

Making a game in 72 hours…

A few weekends ago a couple of guys from VGDsoc and myself decided to enter a 72 hour game programming competition. There were no prizes and I haven't the faintest idea who was responsible for organising it, but I decided to have a go anyway because I always really enjoy the pressure of coding competitions, since they force me to actually work hard rather than honing my already tip-top procrastination skills. That and my sleeping pattern was becoming alarmingly close to what could be described as 'sensible'. Now that the competition is over and we've made a game that I'm really proud of, I thought it'd be cool write up a summary of the process we went through.

Incidentally, if you're thinking that game development couldn't possibly be interesting and that this entry will be excruciatingly boring, you're probably right. If you don't even get slightly aroused by the thought of four GeForce 7900s running in SLI then you should probably go and read a different blog. Mat's is quite good.

The competition started at 6pm on Friday night, when the chosen theme was announced – "Magic". While we weren't especially happy with that, Jon and Dunk both came up with ideas fairly quickly, which they illustrated with everyone's favourite dynamic modelling tool: MSPaint.

Duncan's idea involved you assuming the role of an evil witch and having to thwart the progress of various heroes who are attacking your castle. You do this by aligning various spell ingredients in a Tetris-like fashion to cast spells on the approaching hero:

Jon's idea was a turn-based strategy game in which you control a wizard and do battle with various other AI-controlled wizards:

After a bit of discussion we decided to go with Dunk's idea, despite the fact that it was much more ambitious both technically and artistically. This was mainly because we had horrible visions of Jon's idea ending up like the games that they have installed on the machines in DCS which are (with the notable exception of Klickitty) fucking awful. Time being of the essence we immediately got to work with our respective jobs: Dunk composing music and recording sound effects, Jon doing some further design of the gameplay and me coding wrappers around OpenGL and the general framework of the game.

By Saturday evening I had a fairly nice framework written. It was practically the same one I've written many times now for different competitions and I'm completely sick of re-writing it every time – but the rules usually state that old code can't be reused. One thing I'd never done before was a Font engine, for which I used the fantastic FreeType library. Dunk had composed some fantastic music and recorded various sound effects, including a particularly impressive witch impression, voiced by his mother.

Up until this point I'd been working with my own hilariously bad "coder art" to see how things would be laid out on screen and generally test stuff out, but early on Sunday morning Jon finally finished the first piece of real art for the game – a prerendered backdrop (created in Anim8or. We were all really impressed with how good it looked in the game and it gave my motivation a huge boost because it's so much more fun when what you're making actually looks something like a proper game. By this point the sleep deprivation was starting to have a seriously negative effect on my programming abilities, leading to some gloriously disgusting code, such as this lovely thing:
std::map<std::string, std::vector<std::string>>::iterator i
And no, I don't know why I didn't just use the std namespace either, so please don't leave any smartarsed comments about it.

Meanwhile, Jon was working on the artwork for the landscape in the top-right hand corner. He started off by sketching it out on paper, then scanned everything in and neatened it up before putting it all together and adding colour:

I was going to write more about how the code was progressing here, but I can't think of anything particularly interesting to say about sitting around eating Doritos and programming in my underwear. It wasn't even my Superman underwear. Here, then, is some more fantastic art that Jon did:

A few more hours of work and everything was really starting to come together:

Although it looked good, there was still a lot of work to do – and the deadline was fast approaching. Jon and I spent the last couple of hours frantically implementing all of the spells that Dunk had designed and adding the sound effects into the game. I was pretty gutted that I only managed to get a fairly small selection of Dunk's sounds in the game. We also probably should have played sounds in a seperate thread, since there's some stuttering, but our lovely Concurrent Programming module has ingrained us all with a terrible phobia of multithreaded programming.

We were still working on the spell effects until literally the last minute. We didn't have time for any trivial little niceties such as testing to see if the final version actually runs; we just packaged it all up together and then silently prayed while waiting on what seemed like the slowest FTP transfer ever. I still haven't seen what happens when you cast some of the more difficult to obtain spells. Our timing couldn't have been more perfect:

After making sure that the submission had been received properly we decided it was probably time to start testing the game out. To my shock and delight it actually worked, although the complete lack of any gameplay balancing meant that it was insanely difficult to play. You can download the version that we submitted here – but remember that it still needs a lot of work on balancing. I will post a new version when we get around to finishing it off.

All in all I'm very proud of our game, though a little ashamed at writing 4394 lines of code without a single comment. In the end we placed second in the competition (full results, we're Team VGDS) It just goes to show, yet again, that VGDsoc really is capable of finishing projects. If only we were self-motivated enough to do it without needing the pressures of a deadline to force us to work…

- No comments Not publicly viewable

Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

March 2006

Mo Tu We Th Fr Sa Su
Feb |  Today  | Apr
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31      

Search this blog


Most recent comments

  • I can only assume you had some manner of music device on your person, and are not able to summon mus… by on this entry
  • Already stopped and cashed out! Hooray for getting enough for half a new computer with just a few da… by Bob on this entry
  • I'm sure this will end well! Stop before you have to sell a kidney! by on this entry
  • and the hair has to come over one eye as well. and a piercing in the lip would help. And certainly b… by on this entry
  • by on this entry

Blog archive

Not signed in
Sign in

Powered by BlogBuilder