Early 4x4 BGH game. One Terran goes 7rax, the other goes 11rax (both dont have marine range, its too early, both dont have even gas). Both place bunkers. One bunker can reach other, while the other can't. Both obviously got marines. How is this possible? Is this some kind of gosu pixel-perfect bunker placement where one can attack while the other can't?
Diagonals are buggy I think distance wise in BW, I think one side often has an advantage - same thing happens in tank vs tank. Someone smarter than me would have to explain it properly though!
I don't know exactly how it works but this video goes more in-depth about the weirdness of range in bw particularly with bunkers. My guess is that the top bunker only needs to be in range of the bottom bunker's edge to hit while the bottom bunker needs to be in range of the center of the top bunker to fire.
Hah that is some seriously pesky building placement. Yeah I think range is considered in a dodecagon (12-sided) shape, so if the corner of that shape touches the other bunker, it'll shoot, but if the edge of the bunker is not touching a corner, and is positioned instead oriented toward the flat side, there's a discrepancy in who gets to shoot.
On August 10 2024 22:32 iamslow wrote: Can please someone explain this? Is this some kind of gosu pixel-perfect bunker placement where one can attack while the other can't?
Short answer yes but it's not very complicated.
The easier way to visualize and conceptualize it is imagining the attack comes the bottom center of the bunker.
So if you look at the screenshot you can replicate this this every time by just going to build your bunker then measuring up 3 bunkers(6 tiles) and then left two more tiles. (from the point touching the top left of their bunker)
Most people probably know this but given that there is a very very tiny window for this to actually come into play due to the potential of the SCV's getting sniped on either side and outright killed before it even occurs being the most likely scenario.
as mentioned, unit ranges are represented by a dodecagon, not a circle:
int xy_length(xy vec) const { unsigned int x = std::abs(vec.x); unsigned int y = std::abs(vec.y); if (x < y) std::swap(x, y); if (x / 4 < y) x = x - x / 16 + y * 3 / 8 - x / 64 + y * 3 / 256; return x; }
why did BW implement ranges this way, instead of using Euclidean distance?
because (a*a + b*b) costs up to 80 CPU cycles in "ye olden times" (1996-1997 Warcraft 2 era)