I update this blog so infrequently it’s somewhat embarrassing, but I finally think I have something to talk about.  I wanted an informal chronicle of a very simple game I’m working on based off of source and assets from XNA Game Studio Express documentation.

 

The tale begins about a month ago when David Weller and I were signed up to give some XNA Game Studio Express presentations at an internal event called TechReady.  My presentation wasn’t terribly interesting and my review scores certainly reflected that.  I learned a lot though and it was a great experience.   Dave gave a delightful presentation detailing how to take Tutorial 3 from the XNA documentation and turn it into an Asteroids-clone in an hour.  He called the game Rox.

I think I have an old copy on my desktop, but this is kindof what the game looked like at the end of his hour:

 

Rox: Needs more Cornflower Blue.

 

 

 

 

 

 

 

 

 

 

 

…which is pretty damn amazing for a 1 hour presentation.

 

Dave let me play with his code a bit to add some nifty post processing effects.  And I found when I started messing with the original source, I couldn’t stop.  

 

After a suggestion from a coworker that the game should look “more 3D”, I decided to mess around with it to make a little “more game” out of it.  After about 6 or 7 hours of scattered tinkering I ended up with something that I was actually enjoying quite a bit.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Rox 3D: I really did have this running before I heard about the 2D Wing Commander.

 

Believe it or not, it’s pretty much the same game code.  The data fields were already there for 3D – I simply added another axis of freedom for the asteroids, a new camera, a cone-firing shotgun-like weapon, and that shield thing.  The ship still moves on a 2D plane, but instead of warping from one edge of the play field to the other, everything bounces off of invisible walls now.

The things that took the longest time were just parameter tweaks to the simple shaders I wrote for the shield and post process “bloom”.  Everything else is plain old BasicEffect and Space War assets.

 

I’m now working on Rox 3D 2.0 which starts with a major refactoring.  The original game was pretty much packed into a gigantic Game1.cs file with a couple small “entity” classes.  I’ve broken up the components into the following engines:

·         Audio

·         Game Simulation

·         Input Handler

·         Renderer

I’m planning to keep the entity system and pack the physics and AI work into the game simulation itself.  I’m planning to expand this into something a bit more boisterous than a 3D asteroids clone, though I want to keep that concept of a 3D gameworld with 2D planar controls.  Here’s what’s going though my mind as the features important to me:

 

·         More procedural content

o   Lose the Space Wars assets, try to roll my own textures out of glyphs made in Expressions Beta 1

o   Dress up the backdrops and image-space effects

·         New lighting model

o   I want to use a BRDF like Cook-Torrance for lighting with multiple light sources

o   I’m planning to make a hybrid of realistic lighting and fantastic objects

·         AI Enemies

o   I want stuff that will chase me or shoot at me

·         Art style

o   Make the game more visually interesting using LOADS of simple particles

o   Make all the enemies share a color palette to differentiate stuff that hurts you  from stuff that doesn’t hurt you

o   Lay on the post processing.  I’m barely touching the GPU, and since my geometry, shaders, and textures will be relatively simple, I’m planning for resolvapalooza.

·         Tech

o   Move to 360 development so I can concentrate on making shaders without taking multiple hardware config into consideration

o   In that spirit, split my Update into 4 worker threads and start working on load balancing and multithreaded data management (I’m thinking about double-buffering my Update data)

 

Right now I’m deep in to refactoring:

 

 

 

 

 

 

Turning 4 code files into a nice organized engine with about 20 code files will keep me busy for a bit.  I have GDC coming up and I figure if I have time at night, I’ll work on it then.  I’m no longer the raging booze jocky I claim to have been in my youth, so I’ll probably be ducking out early most nights to geek out on source code.

 

So until next time: