Sunday, December 25, 2011

A game in 2 weeks.

So, while at Realtime Worlds, they decided to let everyone have a play and gave them 2 weeks to do a game. We were broken up into several teams, each was supposed to have about 5 folk on them, however some had 7 or so, and out team had 3. Still, our team was awesome, and I wouldn't have had it any other way!
Although we had 2 weeks, we were supposed to spend the 1st week coming up with a few ideas, then the second week actually coding the chosen one. We had to submit the ideas to Dave and a couple of others and they would pick which one we were actually allowed to do in the final. I more or less ignored this, and spent a few days doing some research into imposters (more on this later), which basically allowed me to stack the deck so they'd have to approve the game we wanted to do. With only 3 members of our team, we played the sob story about how little time we'd have compared to the others, and that having done so much work on these imposters we should really be allowed to just carry on. Unlike most of the teams, I wanted to use the time to prove some tech that I wanted to use in MyWorld, not just have fun for a week making a game.

So what are imposter? Imposters are sprites that gave "many" rotations that you can use to "pretend" they are 3D objects - or entire 3D scenes for that matter! You can use them as a single billboard sprite rather than draw a complex 3D model, or even an entire area of a 3D world. They can be very handy. I'd done some work in them before where I had dynamically generated them, along with an Imposter ZBuffer which allowed you to drive "through" a sprite scene. Yeah... it's as odd as it sounds! Each texel in the imposter has a depth value, and that means a 3D model could move between it's pixels, unlike a normal billboard, where you could only move in front of, or behind it. They were pretty neat. But for this test, I was ONLY interested in raw throughput. So I did a bunny test (all good tests use bunnies!), and I tried to draw as many as I could. The scene shown here has around 50,000 bunnies. I have another image (I might upload them all to Flickr) that has around 200,000 at 38fps. These weren't static bunnies either, they followed a 3D terrain, and if you looked around them, they would look like a 3D model - pretty nice.

So, Dave and his gang picked the game we wanted - basically a Zombie tower defence game, and we had one week to make it work. We were given the world model in which it would all take place, but had to write everything else.

The first thing we did was to come up with a funny hovering Zombie type critter. He wasn't very pretty looking, but having no feet to animate meant a lot less imposters! This game was ALL about the massive number of things attacking you - kind of like the original doom, but on a bigger scale.

As a team, we were able to split things really easily. I did all the graphics and effects, Bill Henderson (who did the physics in Wild Metal Country) did the physics and general gameplay, and Sam Phillips did any graphics we needed. That said the art department weren't specifically assigned to a team and just churned out art as needed, so Tahir Rashid did all our 3D models (tanks and the like). This worked really well. While other teams spent ages in discussions about roles, and even changing engines part way through, we had really clear jobs and we all just got on with it. It was the most fun I'd had there in years!

Because of the massive numbers of Zombies the engine could do, I didn't even need to kill of dead Zombies, so corpses littered the field - it was very cool. They would pour out of the burrows hundreds at a time, till there was tens of thousands attacking! I did a very simple route finding system - and the would get stuck, but for the massive numbers, we couldn't do proper route finding for them - it worked pretty well though.

We put in lots of weapons to buy, and added a day/night cycle. During the day you could rebuild, add new weapons, and basically recover from the carnage the night before. At night, all you could do was watch, and keep your fingers crossed. Well... almost. You controlled a tank which you could go out and help defend areas, and basically blow up zombies on mass. Your tank took damage and you could recharge by returning to base, but if you'd left a hole in your defences, the zombies would get in and attack and destroy your base.

Some of the effects turned out really well (especially considering how little time we had). I wrote a small particle engine (that I donated to the other teams if they wanted it), and that let us do some cool effects and weapons. The Flame thrower and lasers were neat, as they'd set zombies on fire, and they'd run around with their head burning! The nuke was awesome! The nuke would explode in a massive BOOM, and fling everything - living or dead into the air, flying all over the place! WHEN you failed, you got to drive around just letting off nukes all over the place, it was very cool.

So, there you go.... You would think, with a game everyone enjoyed, Realtime Worlds might do something with it; but no. They were dead set on doing an amazing 3D world, and using it to play "Farmville". Ah well... It was good while it lasted. Still, the MyWorld tech was bought before RTW sank beneath the waves, so there is a remote chance that at least can still be saved. Of course, they'll have to hurry, I've seen several demos that are very close to what MyWorld might have been. That said.... I doubt they would have had flaming Zombies in them.

Oh... and Merry Christmas!! :)