February 12, 2009

Plan, don't organize

[Note: The large list of unspecified tags this post refers to was eventually replaced by the 20 behaviors you see now.]

A small scale data problem

The post tags on this blog weren't planned well at all. I didn't think it was important to imagine what kind of posts I might be writing in advance, because I wanted to let things develop more organically. This worked pretty well in most ways, because I'd never written a blog before and needed to feel around a bit for what I liked writing about.

There's a downside to letting things develop organically though. I've invented new tags for posts as I felt I needed them, and as a result I've accrued a long list of fairly obscure post tags that only have one or two posts. At some point the list will get cumbersome enough that I'll have to go back and re-tag every post, and try to organize all that other stuff into larger categories in some way that makes sense. Every time I write a new post, I'm accumulating more bad data and making that task harder for my future self.

A disorganized blog with 50 posts isn't really that hard to fix, and probably only bothers a certain kind of peron in the first place. In game development, though, this same problem can easily develop on a much larger scale, costing teams huge amounts of time and quality.

Large scale data problems

Game design at any level usually involves managing lots and lots and lots of files. If you're designing missions, it's thousands of mission files and questgivers and their text. If you're designing enemies, it's thousands of enemy definitions with their powers and character models. If you're designing items, it's thousands of item definitions with their text, tuning, and geometry files.

Sooner or later, you're going to want to have all of these files neatly categorized into 4 or 5 or 22 types. This will happen. Maybe you'll need to evaluate if ranged and melee characters have an equal number of challenging enemies, or if there are enough quests of a certain type in a zone, or you'll decide to add a certain AI flag to all of a certain type of NPC. Maybe you'll need to convey what kind of powers each enemy has to your players, or have to track whether a given type of gear or resource is overabundant in the world, or track damage types across all enemies in the game.

When this happens, you'll find yourself in one of two situations:
  • All your data will already have clear categories, which you can then manipulate or track. This means you've planned.
  • Nothing will really fit together very clearly, and you'll have to try and impose order on chaos. This means you now have to organize.
In the former case, you've saved time on both ends, because the data following a preplanned structure was easier to generate; you've got templates and guidelines and maybe even a hierarchy of data. Making changes to a large number of files at once is easy, because you can grab all of them in one chunk. You'll be able to generate twice as much data because of the large amount of time you'll save on implementation and revisions.

In the latter case, you've already spent a ton of extra time building everything by hand, and then you'll have to spend even more time standardizing things after the fact. But first, you'll have to spend more time figuring out what categories even make sense for the big pile of files you've generated. After that, you'll have to spend still more time making the outliers fit into one of the categories by redesigning them.

Then, unless you're really lucky, you'll realize that one or two of your emergent categories has far too many or too few items in it, and have to redesign or add or remove a significant number of files. Making large scale changes in a system like this is effectively impossible because you can't even find the ones you want, much less easily modify them.

Organizing data is one of the many situations in which skipping a few hours of planning can cost you many weeks of wasted time down the road. I learned this lesson the hard way on my first game. Don't fall for it!

No comments: