Shawn Hargreaves Blog
Toward the end of every Game Studio development cycle, we schedule some time to down tools, install the latest daily build, and use it to make a game. This serves as a sanity check (does our product actually work?) and also a learning exercise (what things suck the most? What should we try to improve in the next version?)
That's the theory, anyway. And in theory, there is no difference between theory and practice :-)
We did an AppWeek shortly before shipping Game Studio 1.0, which produced minigames by Dean and Minjie, plus a bunch of stuff that was too unfinished or too much of an IP violation to release. Every subsequent release had an AppWeek in the original schedule, but when push came to shove things just took too long and the bug pile was too big, so AppWeek ended up on the cutting room floor.
Until now. I am happy to report that AppWeek 3.1 took place as originally scheduled. Here's the title screen from the game I made:
This is an online multiplayer game, inspired by Capture the Flag but with cats instead. Players are divided into red and blue teams. Each team has a base which is marked by a plume of colored smoke and occupied by a cat. The objective is to infiltrate the other team's base, steal their cat, and take it back to your own base without being killed.
I borrowed from many samples to stitch this together, making it more of a Frankenstein remix than an original piece of programming. One of my goals was to investigate how well our sample code holds up if you use multiple samples in a single game (verdict: this worked well for me).
I started with the Network State Management sample for the main program structure and menus, and added code from the Network Prediction sample to synchronize object positions during gameplay. I used the Heightmap Collision with Normals sample for terrain rendering and collision, and the Generated Geometry sample to create the sky from a photo I took on Orcas Island. I tarted up the terrain rendering by adding a normalmap (using the NormalMapProcessor from the Sprite Effects sample to convert it from a grayscale displacement map), and threw in the Bloom and Lens Flare samples for graphical bling. My player character used an avatar animation system that Dean wrote for a GDC demo (which is not yet a sample, but will hopefully someday become one), plus the Skinned Model sample to provide fallback character rendering on PC and for players who have no avatar. Add a camera (taken of course from the Chase Camera sample) and we have the beginnings of a game:
I needed weapons to liven things up, and figured vehicles wouldn't hurt either. I used the tank model and turret rotation code from the Simple Animation sample, and added the ability for players to get in the tank and drive it around. For smoke plumes, weapon trails, and explosions, I used the Particle 3D sample, plus the Authoring Particle Systems using XML tutorial so I could easily tweak the particle settings:
Not satisfied with just one type of vehicle, I also included hoverships, using the Custom Model Effect sample to render them with an environment map:
I borrowed more code from the Picking sample (for drawing gamertags above players), the 3D Audio sample (for drawing billboarded cat sprites) and the Safe Area sample (the SafeAreaOverlay component).
It was interesting how my development resembled a scaled down version of working on a commercial game. I spent the first couple of days writing nice code, refactoring as I went, and creating a robust Internet-ready network protocol. Then on Friday I switched into "gotta be done by 2:45 PM" mode, and started hacking as fast as possible. Forget design principles: I made things public any time I needed to access them. Forget network efficiency: I took the easy way out and made the host responsible for all empty vehicles, cat capture status, and scoring.
It worked, at least with two players. In theory it should support up to sixteen, but I didn't have time to test that many. I suspect it uses too much bandwidth for many players to work over the Internet without more optimization, and I have no idea what the rendering perf would be with more going on. The weapon damage amounts and collision radius are less carefully tweaked than I would have liked, and I didn't have time to implement shadows, gameplay sounds, vehicle respawning, or a radar/map.
But hey. Not bad for 4 days work. I continue to be impressed by how productive programming in C# can be!
You inspired me to write about my AppWeek game:
At my current employer we do something like this periodically as well, called Hack Week, where every employee has the objective to come up with a Hack Project and take it from idea to shipped product in a week (with the goal of creating value for customers in small steps without interference from upper management).
It's awesome to see that you guys have a similar tradition and see the neat things that come out of it. I believe things like this are important for a tools programmer to stay grounded in the concerns and priorities of the people actually using his tools, so it's really comforting to know that the team behind XNA not only used to work on video games, but still writes them occasionally too (even if they only do it for a week at a time).
Looks cool - I want to play it! What are the chances of the binaries (or code) being released?
You should release it on xblig :-P
It's probably better than 80% of what's out there in Community Games (Indie Games). I'd love to see it released. I think it's amazing how productive you are. Only so much can be attributed to C#, which I agree is amazingly productive. I'm always iffy about using other people's code, but you've shown that with good samples things can work out well. Good job. Thanks for sharing.
I am very impressed by your blog and your replies on the XNA developer center. Right now, I encountered one problem and I am wondering if you could help me. The problem is that: when I use Particle3DSample to make explosion in my game, I could not put the explosion at the place that I want; and the particles move if my camera moves. Could you tell me what the reason is. I already checked the following URL:http://forums.xna.com/forums/t/31738.aspx, but I didn't understand.
Thank you very much!
where can i download your AppWeek game source code?