|
The Mechanics of Starcraft 2
Part 1
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.
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.
|
This is a very cool article. Its nice to see the mechanics behind what we have all noticed, but just don't know enough about to put into an intelligible post. I'll be looking forward to your expansions on this, and how they tie together.
|
Thanks for writing this up, I am looking forward to part 2.
|
It's true that autosurround makes the game easier with regard to melee units. On the other hand, I really like the aesthetic effect of swarming over a group of marines with superfast zerglings in SC2 -- it's beautiful and feels cool.
So while I respect your plea, I think this is a mechanic perhaps best left to BW. Your solution of lowering zergling speed seems like a huge sacrifice simply to encourage possible worker surrounds. Your proposal of having zerglings (etc) spread out when you don't tend to them is interesting, but I'm not sure anyone really understands what you mean. How would they "spread out''? When are they "moved carelessly"? How would this encourage interesting gameplay?
In the end, I think we're stuck with autosurround, and I'm not sure that's bad. Manual surrounds are just a different mechanic for a different era.
|
Thanks for takin the time to write this, enjoyed it.
|
Great read. From a more casual perspective I think that the improved AI is great. As the game evolves the better players will learn how to manipulate their units in creative ways.
Im looking forward to the firing rate article. My biggest struggle with sc2 so far has been how quickly the battles end.
|
On June 22 2010 22:48 kajeus wrote: It's true that autosurround makes the game easier with regard to melee units. On the other hand, I really like the aesthetic effect of swarming over a group of marines with superfast zerglings in SC2 -- it's beautiful and feels cool.
So while I respect your plea, I think this is a mechanic perhaps best left to BW. Your solution of lowering zergling speed seems like a huge sacrifice simply to encourage possible worker surrounds. Your proposal of having zerglings (etc) spread out when you don't tend to them is interesting, but I'm not sure anyone really understands what you mean. How would they "spread out''? When are they "moved carelessly"? How would this encourage interesting gameplay?
In the end, I think we're stuck with autosurround, and I'm not sure that's bad. Manual surrounds are just a different mechanic for a different era.
Yea the aesthetics are very pleasingl.... I love when a patch of zerglings are running through a slower group of hydralisks... Its especially cool when they switch directions.... The swarm!!!!
|
So that's why marines feels that they have tougher skin than SC BW, cause of it's intelligence in path finding than their predecessor. Goodjob at explaining :D
|
Really good article, an interesting read for sure.
I think I disagree about your line: "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."
It's shortsighted to say that this is only a negative thing, right? I mean, commentators like Day[9] have been spending the entire Beta lamenting the "one-control group syndrome" that leads to these perfect tight balls. The reason being that AoE abilities like storm, fungal growth, Collossi, etc really eat into groups like this, and units can really be caught out of position.
Lamenting the end of BW flanking is in some ways like the moving shot debate. It's a relic of an old engine, and wasn't likely to be replicated in a new engine. But this new engine has it's only quirks and limitations and it's just a matter of time until they're found. Then when SC3 comes out, we'll lament the end of those things.
At least, that's my hope in all this.
|
On June 22 2010 22:48 kajeus wrote: Your proposal of having zerglings (etc) spread out when you don't tend to them is interesting, but I'm not sure anyone really understands what you mean. How would they "spread out''? When are they "moved carelessly"? How would this encourage interesting gameplay? I think his point about spreading out is that if in BW you got a whole bunch of marines and A-clicked the other side of the map, they would spread out into a giant conga line and get owned by flanks, whereas in SC2 they stay in a very tight ball and flanks aren't as effective. He wants it so you have to baby sit your troops more carefully when moving your army.
I prefer how it is in SC2, bad pathfinding is the biggest problem with almost every RTS. I used to love WC3, but since playing SC2 I just can't play it any more because the god damn units just spaz out all the time.
|
Soooo it was the AI then... i always thinked my goons were retarded
Really nice post, looking forward for the next
|
wow. epic op and great read, thanks for this.
|
On June 22 2010 22:56 Takkara wrote: Really good article, an interesting read for sure.
I think I disagree about your line: "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."
It's shortsighted to say that this is only a negative thing, right? I mean, commentators like Day[9] have been spending the entire Beta lamenting the "one-control group syndrome" that leads to these perfect tight balls. The reason being that AoE abilities like storm, fungal growth, Collossi, etc really eat into groups like this, and units can really be caught out of position.
Lamenting the end of BW flanking is in some ways like the moving shot debate. It's a relic of an old engine, and wasn't likely to be replicated in a new engine. But this new engine has it's only quirks and limitations and it's just a matter of time until they're found. Then when SC3 comes out, we'll lament the end of those things.
At least, that's my hope in all this. You're absolutely right. "Careless spreading out" would effectively nerf fungal growth, storm, colossi, siege tanks, etc.
It could be lamented as causing the game to require LESS micro!
|
On June 22 2010 22:59 kajeus wrote:Show nested quote +On June 22 2010 22:56 Takkara wrote: Really good article, an interesting read for sure.
I think I disagree about your line: "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."
It's shortsighted to say that this is only a negative thing, right? I mean, commentators like Day[9] have been spending the entire Beta lamenting the "one-control group syndrome" that leads to these perfect tight balls. The reason being that AoE abilities like storm, fungal growth, Collossi, etc really eat into groups like this, and units can really be caught out of position.
Lamenting the end of BW flanking is in some ways like the moving shot debate. It's a relic of an old engine, and wasn't likely to be replicated in a new engine. But this new engine has it's only quirks and limitations and it's just a matter of time until they're found. Then when SC3 comes out, we'll lament the end of those things.
At least, that's my hope in all this. You're absolutely right. "Careless spreading out" would effectively nerf fungal growth, storm, colossi, siege tanks, etc. It could be lamented as causing the game to require LESS micro! U forget that spells like Storm were much more stronger due counter the "spreading out" of units from primitive AI.
|
Thank you for the excellent post. It's a good short read up that can really benefit your micro if you use this information well. Units behave so differently from BW that micro has to take on different shapes and forms.
Can you give examples of what players can do to improve on the built-in pathing, swarm-effect, etc? I think a major problem with players now is the "one control group" syndrom; people group all their units in one group, and while it makes for effective attacks early on, you really benefit from getting a bigger concave later on in the game. This can be achieved bu just splitting one control group hap-hazardly into two, and moving the groups seperately.
What options do players have to improve their micro, movement-wise?
|
Thanks
On June 22 2010 23:11 exnomendei wrote: Thank you for the excellent post. It's a good short read up that can really benefit your micro if you use this information well. Units behave so differently from BW that micro has to take on different shapes and forms.
Can you give examples of what players can do to improve on the built-in pathing, swarm-effect, etc? I think a major problem with players now is the "one control group" syndrom; people group all their units in one group, and while it makes for effective attacks early on, you really benefit from getting a bigger concave later on in the game. This can be achieved bu just splitting one control group hap-hazardly into two, and moving the groups seperately.
What options do players have to improve their micro, movement-wise?
You could artificially create one on the spot by spamming waypoints till they form a line (as long as you break the magic box, the radius is 6 distance units wide, if your group is bigger than that it will form a line). If you continue to move in the direction of the line they should stay that way, then if you move sideways they should form a concave faster than normal.
Worth a shot if you think that units take too long to form a concave (its a bit risky though), the other thing though is you can just attack -> move -> attack and hold that ball so then all your units are in range already.
Unfortunately SC2 doesn't give you that much control in that regard, but ill hopefully have more tips with magic boxing and stacking as they are available in SC2 (although not as useful).
Its more about explaining though more than anything else
|
Really intresting to get some of the mechanics explained. Good job OP.
|
|
One of the best article I've read on TL.
Really well put and I'm really looking forward to Part 2. I'm currently doing an Engineering Degree in Programming (Think that's what It's called, you'll have to forgive me, I'm French >_>) and Path finding really is an interesting subject, I have learned a whole bunch about it and I'll definitely be digging out OpenSteer.
Once again, very nice article!
|
wow this is really freaking impressive
|
|
|
|