The Mechanics of Starcraft 2
This will be the beginning of a multipart series on the differences of the mechanics of BroodWar and Starcraft 2. It will outline the pros and cons of each, with specific points and examples that hopefully everyone can understand and relate to. People prefer short and sweet, so I will try to get as close to that as possible, hence dividing this article into many threads over time.
What I intend to achieve is to allow more informed discussions about the mechanics of Starcraft 2. I often see irrational replies in threads that are mis-informed due to different use or lack of understanding. BroodWar fans end up looking like stubborn people who don't like change, and Starcraft 2 fans end up looking like people who want to win without trying.
Many of the points represented in this article will consist of estimations, I did not program BroodWar or Starcraft 2 so it's natural that there will be a lot of guess work on my part. Also please take my opinions with a grain of salt and make up your own opinion. Fact is fact, opinion is opinion, this article will contain elements of both.
Unit Control (Part 1)
Unit Control involves the ability to for players to move units in a way that makes them more effective individually, whether it be dealing damage, avoiding damage, or effective movement.
As Unit Control is such a broad topic, this also will have to be split into a few parts. Part 1 will cover aspects revolving around pathfinding.
Starcraft 2 uses an AI pathfinding technique called flocking or swarm AI, the effect is coordinated movement the same as what you get with a school of fish or a flock of birds. Most likely Starcraft 2 uses an advanced algorithm that finds the fewest amount of waypoints and allows autonomous steering behaviour for units to smoothly hug their way around obstacles and other units.
From a purely development perspective Blizzard has done an extremely good job with this, it's quite a specialised field and there isn't a lot of information on it, with 200 units and chokes and obstacles everywhere it still works very efficiently and flawlessly. It is a technique which is highly regarded in the game development community, so it's understandable why Blizzard did it. Until I started playing BroodWar I also spent a long time trying to learn how to code this too.
BroodWar works a little differently. On an isometric map where each unit can only go in 8 directions, coupled with much lower processing power, this calls for a much more primitive pathfinding algorithm. The most common pathfinding algorithm in this situation would be a tile-based A* (A-Star) algorithm and just by looking at the units I would say this is a pretty good guess.
Tile-based A* Pathfinding Example
BroodWar Dragoons showcasing the A* algorithm
The map is filled with many nodes layed out like tiles, each unit follows these nodes one by one until they get to the destination, the nodes that units can take become waypoints. So while Starcraft 2 can avoid collision by using steering behaviour to hug their way around the small radius of another unit, BroodWar units are constrained by the fact that they are competing for waypoints. This is the main reason why you get much better surround in Starcraft 2 than in BroodWar., but also the reason why units have to spread out so much to move around.
Slight offsets cause the mutalisks take different waypoints when turning 180 degrees
Emulating BroodWar pathfinding by spamming waypoints towards a destination
The difference is that BroodWar relies almost solely on A* to get the units to move from one point to another, mapping every single node the unit needs to traverse over. In Starcraft 2, it seems that a lot of the pathfinding is left up to the unit individual, and waypoints are kept to a minimum.
Collision avoidance is also much more primitive in BroodWar as well. Units avoid collision by stopping to give-way while another unit moves around it or calculates a new path, this is probably one of the first things you learn about dealing with collision avoidance between units. You often see this in BroodWar with worker scouts, when one stops, and the other goes around, or both the players forcefully try to move them past and all it does is hold both the workers up.
In Starcraft 2, units will avoid obstacles and other units (but also flock together) using steering behaviour. Logically, every unit has sensors which when colliding with another unit, will signal for the unit to turn in an appropriate direction to avoid it. This allows units to weave in and out without calculating a whole new path or losing momentum, in a worst case scenario the units can ignore the collision radius, allowing for more fluid movement and higher movement efficiency overall.
OpenSteer: An open source library for autonomous steering behaviour
BroodWar zerglings are busy deciding who goes first, while SC2 zerglings start turning before they even get there
A lot of BroodWar fans dislike the new pathfinding AI and there's good reason to. One of the most effective tactics in the early game is flanking. If units move in a perfect tight ball, flanking will be useless, period. The reason zerglings dish so much damage to marines when they are spread out is because marines are ranged and zerglings are melee units. If you can effectively reduce the "surface area" of your army, your army will receive much less damage. This also becomes a compounded effect due to the difference in army size and damage growing bigger and bigger after each death.
Flash vs Effort (OSL Finals Game 3). Flash's un-attended marines competing for the same waypoints form a spread-out line, Effort punishes this with a well-timed zergling flank killing all the marines. Had Flash concentrated on his marines, this wouldn't have cost him the game
The other issue is that ideally, the amount of effort focused on unit movement should directly correlate to their effectiveness. Players that don't attend to their units should be able to be punished. However in Starcraft 2, there is a feeling that the AI can move the units better than humans, meaning that you get the opposite effect.
I can also see how bad unit movement can be frustrating for newer players, there is nothing worse for blizzard than to show what looks like an un-polished game. I believe that units should spread out if you carelessly move them about, but they should also not glitch out all the time due to bad pathfinding AI. We do not need to have people "fight the interface" to create good gameplay mechanics, but we still need the side-effects that improve gameplay as a result.
"Auto-surround" due to better pathfinding can be mitigated. Zerglings are faster off and on creep in Starcraft 2 than they were in BroodWar. Reducing the Zergling's on-creep and off-creep speed back to that of a worker and widening the radius means that an effective surround is necessary to take out a scouting worker, thus the skill of worker scouting can once again become a defining feature of good play.
A badly executed surround allows the probe to live on to fight another day
In a later issue, I will talk about Starcraft 2's extremely high rates of fire which also severely affects flanking ability and other mechanics. The next issue however will be about magic boxing and stacking, following that, probably moving shot.