Coordinated Unit Movement
January 22, 1999 Page 1 of 9
How many times have you been sitting in rush-hour traffic thinking, "Hey, I know where I want to go. And I'm sure everyone around me knows where they want to go, too. If we could just work together, I'll bet we would all get where we wanted to go a lot easier, faster, and without rear-ending each other"? As your frustration rises, you realize that impatient commuters aren't the most cooperative people. However, if you're a game player, uncooperative resource gatherers and infantry are probably even more frustrating than a real-life traffic jam. Figuring out how to get hundreds of units moving around a complex game map in real time - commonly referred to as pathfinding - is a tough task. While pathfinding is a hot industry buzzword, it's only half of the solution. Movement, the execution of a given path, is the other half of the solution. For real-time strategy games, this movement goes hand in hand with pathfinding. An axeman certainly needs a plan (as in, a path) for how he's going to get from one side of his town to the other to help stave off the enemy invasion. If he doesn't execute that plan using a good movement system, however, all may be lost.
Game Developer has already visited the topic of pathfinding in such past articles as "Smart Move: Path-Finding" by Brian Stout (October/November 1996) and "Real-Time Pathfinding for Multiple Objects" by Swen Vincke (June 1997). Rather than go over the same material, I'll approach the problem from the other side by examining the ways to execute a path that's already been found. In this article, I'll cover the basic components of an effective movement system. In a companion article in next month's Game Developer, I'll extend these basic concepts to cover higher-order movement and implementation. Though the examples in these articles focus mainly on a real-time strategy game, the methods I'll describe can easily be applied to other genres.
Page 1 of 9