X48 2010
Posted in Code, Contest, XNA on March 8th, 2010 by AndrewThis year I again entered Microsoft’s X48 programming contest, taking the spot of a programmer who dropped out of a group at the last minuet, this time around, Birmingham City University hosted the 27 hour long coding marathon.
Not being with my usual team that enters such events (veterans of last years X48, the Last.fm Hack Day and D24 (Derby Unis’ own, XNA contest)) was a good experience getting use to a different team dynamic very fast. I was the main coder of the team, as I’m in the final year and the other two programmers are in the second year, our artist was also a replacement, a poor soul dragged out of bed at half-7 in the morning after a mere 4 hours sleep to replace the original artist that had to drop out due to illness. Having had half our team replaced in the week before the event, we thought our team name was an obvious choice, ‘Plan B’ would work furiously with XNA to create the best game they could.
Each X48 even has a theme to code to, that is only revealed in the introduction talks at the even, this time around the theme was ‘discovery’ apparently chosen to be deliberately vague.
We had the advantage that one of the programmers in the team is more of a game designer than a programmer, so we came up with lots of ideas, all trying to get away from the obvious space-based gameplay.
Eventually we decided that you should play in a dream-world and be tasked with discovering this world you find yourself in, we thought that just having the player walking around didn’t sound like much of a game, so we had the idea to cover the world in a black fog, similar to the fog in RTS games (once you’ve revealed a place it stays revealed). This seemed like a half-decent game, but we thought that we were not making the most of the game mechanic, so we added a creature, aptly called ‘figment’, figment is the one that actually lights up the level, and usually hovers around the player as you make your way through the level. Figment also really loves berries, which the player has an infinite supply of (which is most likely what attracted figment to our hero in the first place) you can throw these berries, and figment will chase after them to eat them, lighting up the level as he/she/it goes (we never did decide on gender).
The one level we designed had a number of puzzles that made use of this mechanic (although unfortunately we didn’t have time to program most of them) sometimes you had to throw berries to light the way over a pit that would surely lead to doom, other times you would use them to send figment to help you in other ways, by pushing a switch or picking up a key that figment would keep hold of until you sent him off to unlock a door.
The technical aspect of programming the game provided a few challenges, pretty early on we settled on making it a tile-based game, being the fastest way to make a platforming game that we know of. At the last X48 we decided on a platformer too, I made the call to hand-make the level, which took 6 solid hours of staring at comma separated numbers, (I had foolishly decided that hand-editing would take less time than making a level-editor) this time, learning from the mistake, I set about making the level-editor as one of my first tasks.
It took about 5 hours to make, which isn’t too bad, it was made with artists/designers in mind, since the designer would be the one making the level this time around. The interface was a bit iffy, but you could switch from game-play mode to editor mode at the touch of a button, ‘paint’ on the tiles you desire and save with ease, then switch back to game-play mode to see how the new level played. This saved a huge amount of time, I lost count of how many iterations the level eventually went through, and it ended up being much bigger than we could have ever done by hand, not to mention that the tile-set was huge with our artist industriously cranking out over 60 different 32×32 tiles to make the game look really nice.
The darkness and revealing the map was taken care of by the other main programmer, not being familiar with shaders, she crafted a solution that used several black textures, and adjusted the alpha as figment passed by to get a very nice looking per-pixel effect (we had previously toyed with the idea of revealing a tile at a time, however, with 32×32 pixel tiles that seemed to us like it would be too harsh).
Unfortunately we didn’t win any of the top-three prizes, a very well deserved first place went to a game called ‘dot’ which asked the player to discover how to play the game in a variety of ingenious ways, we did, however, pick up the Innovation prize for our game, which I’m very happy with (and we won awesome kites).
You can find out more about what everyone at the event got up to (and see some of the other games) on the X48 Blog and Flikcr. Bring on next years X48!

