Contents
Postmortem: Mommy's Best Games' Weapon of Choice
 
 
Printer-Friendly VersionPrinter-Friendly Version
 
Latest News
spacer View All spacer
 
November 22, 2009
 
Video Game Watchdog National Institute On Media And The Family Shutting Down [11]
 
Modern Warfare 2 Infinity Ward's 'Most Successful PC Version' Yet [12]
 
New Tech, Design Details Of Project Natal To Emerge At Gamefest In February
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
November 22, 2009
 
Sucker Punch Productions
Character Artist
 
Sucker Punch Productions
3D Environment Artist
 
Sucker Punch Productions
Network Programmer
 
Sucker Punch Productions
Texture Artist
 
Sony Online Entertainment
Brand Manager
 
Monolith Productions
Sr. Software Engineer, Engine - Monolith Productions - #113767
 
Crystal Dynamics
Sr. Level Designer
 
Gargantuan Studios
Lead World Designer
spacer
Latest Features
spacer View All spacer
 
November 22, 2009
 
arrow Upping The Craft: Susan O'Connor On Games Writing [6]
 
arrow Small Developers: Minimizing Risks in Large Productions - Part II [6]
 
arrow iPhone Piracy: The Inside Story [48]
 
arrow And Yet It Grows: Analyzing the Size and Growth of the European Game Market [5]
 
arrow NPD: Behind the Numbers, October 2009 [13]
 
arrow Reflecting On Uncharted 2: How They Did It [5]
 
arrow Sponsored Feature: Rasterization on Larrabee -- Adaptive Rasterization Helps Boost Efficiency
 
arrow Postmortem: Wadjet Eye's The Blackwell Convergence [2]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
November 22, 2009
 
Accepting the Inherent Value of Games
 
Planckogenesis, Part II: Song Structure & Gravy Train [1]
 
Designing Games Is About Matching Personalities [1]
spacer
About
spacer News Director:
Leigh Alexander
Features Director:
Christian Nutt
Editor At Large:
Chris Remo
Advertising:
John 'Malik' Watson
Recruitment/Education:
Gina Gross
 
Features
  Postmortem: Mommy's Best Games' Weapon of Choice
by Nathan Fouts
7 comments
Share RSS
 
 
January 8, 2009 Article Start Previous Page 4 of 5 Next
 

What Went Wrong

1. Garbage Strike.

In retrospect, I feel I waited too long to get Weapon of Choice to run on the Xbox 360 (mid-June for a November release). I went into it simply not knowing exactly what I was getting into and overestimated how much the Xbox would enhance the game's performance.

Advertisement

With XNA on the PC, a generational garbage collection system is used. This basically means it's smart about how and when to collect garbage.

As it turns out, the system on the Xbox 360 is non-generational, which basically means any little thing that needs garbage collection will slow down the game. When I first got Weapon of Choice running on the Xbox 360, the game's smooth PC framerate speed devolved into a slideshow.

It took months to deal with all the garbage collection issues and get the framerate up to a playable speed. I didn't do my homework on the target platform and it hurt badly, even though documentation existed.


Figure 10. Wrap Mouth in Object Editor in "Stage 2" pose. Initially, loading animations like this took over two minutes of wasted time per level due to garbage collection.

If I were to do it all over again, I would have the game's prototype running on the 360 and use the XNA Framework Remote Performance Monitor from the start, to ensure garbage collection was not an issue.

2. My Pipeline Doesn't Look Like Your Pipeline.

As stated before, I developed custom animation and modeling software for creating the game art. I also wrote my own file managing system, even though the XNA Content Pipeline was created to manage assets. (Maybe I have some control issues?)

This worked fine on the PC, as I was able to subvert the Content Pipeline and load everything with my own system. However, my custom asset pipeline was rendered useless when I finally converted the game to the Xbox 360, as XNA only allows assets loaded through the Content Pipeline.

I ended up keeping my custom loading code and simply wrapped it with special code to pass it through the Content Pipeline.

As it turned out, this special code incurred many garbage collection hits since, in .NET, strings are immutable, and with each new string, more memory was allocated. I wrote a special character parsing function to load the data (not using strings and incurring no new memory allocations).

This resulted in other issues that required a patch after launch; my parser failed to handle the idiosyncrasies of some languages which swap the comma for the decimal in floating point numbers.

3. On-the-Job Training.

Before this project, there were many things, such as rigging models and making sound effects, which I'd never tried before. At the top of that list was programming a multi-threaded game update loop.

I changed the game loop to utilize threading too late in the development, which created hundreds of crash bugs, stemming from code in which two threads would access the same static data.

I mainly operated from a "Use Threading Because It Will Make Things Faster" mindset, rather than confidently designing code to enhance the runtime performance. During profiling, I could toggle between single and multiple processor use on the Xbox.

This showed that threading provided around a 15% speed-up. This was good, but it definitely never reached the magical 60fps level.


Figure 11. Level Editor view of a first level boss showing only the mid-ground layers. These layers contained the fighting and generated the most processor work.

The Xbox 360 has six hardware threads. In XNA, thread indices 0 and 2 are reserved leaving developers with four useable threads. I used thread indices 1, 3 and 4 for gameplay updates. Because I put loading on a separate thread so late in the project, I simply assigned loading to thread index 5, rather than try to dynamically switch thread functionality.

In my system, as the gameplay threads are initialized, level objects are assigned to different thread indices. For example, objects 1-1,000 go to thread index 1, objects 1,001-2,000 go to thread index 3, and the rest go to thread index 4.

The background-to-foreground, layered nature of the level design, however, created a situation in which one thread (index 4) would be given the layers with all the action and collision detection requests. I'm pretty sure clumping work onto one thread can retard the benefits of multi-threading.

I recognize that putting collision on one thread, general updates on another, and animation on a third makes sense, but after several attempts, I never got that method to work properly. My "Gosh, I Hope This Helps Some" approach to multi-threading probably explains the meager speed increases.

 
Article Start Previous Page 4 of 5 Next
 
Comments

Amir Sharar
profile image
I really hope that this becomes a profitable venture for Nathan, this game was excellent in all manners and I'd like to see more. With all the lessons learned, and the custom editor created, perhaps it won't take as long for MBG to create other titles.

I have to stress how unique this title was in all aspects. I'm not talking about slight innovations, but rather, something completely different. I've never played a shootemup that had branching levels and stories (these aren't slight differences in the ending, they are completely different perspectives). Of course, the weapons are things never before seen in a game like this. The same can be said of the controls, in particular the ability to spiderwalk on any surface. The art (though I suppose my graphic designer friends would have issues with it) really look like they came out of a sketchbook, and isn't very typical of the art you'd see in 99% of games out there. The bosses are just twisted and epic. Despite being a short game (for $5 I'm not complaining at all!) there's so much here that's impressive, that I really, really hope MGB is financially rewarded and able to pump out more titles.

julian farquar
profile image
My hat goes off to Fouts. I wish I had more hats to take off. We had to design our own level editor for Casebook, which was a rigmarole in itself. I also sympathise with any upper-indie game creator whose art design isn't glitzy and glamorous, yet competes against titles that most definitely are. As the writer on Casebook, I had to generate a plot to a miniscule budget, but my salvation was that the quality of plotting in the great weight of casual (and for that matter AAA games) is fairly weak. Nathan had no such headstart. Amazing.

David Hof
profile image
Very interesting article about an impressive achievement. I also hope you make some money out of it, especially considering that with the volume of low quality games in XNA Community Games I fear it may be difficult for the diamonds to stand out from the duffers.

Andrius Kavaliunas
profile image
Now that is a great article.
Looks like Insomniac is loosing the best programmers :-)

Shawn Yates
profile image
Best of luck to Nathan, I'm curious to see what he comes up with next. Very impressive what he was able to do and I salute his efforts fully. I loved the art style.

Timothy Porter
profile image
Nathan is a genius. Such a nice guy and a great person. I know that this game wont be the last for him or his company. Long live MBG!

Daniel Lawson
profile image
David Hof... the diamonds stand out... like a giant light in the darkness. I think if they added in a common rating... like they do with users... then more games that are great will be shoved to the front of the pack.


none
 
Comment:
 


Submit Comment