|
Bolty's Note: The details of the star-shaped area of effect bug came to light thanks to the testing of ink and Azrael. Hi, lurkers, During the last few weeks, there were several threads about how big the Diablo II screen is in in-game yards. Testing for screensize was done with spells (firewall and static field). This is good because spells are the only place yards are mentioned by the game, anyways. As many of you know, though, many area effects have rather weird shapes (i.e. often they affect different monsters than you would expect). This is warned about in many strategy guides (especially about static field and holy freeze). This was also mentioned in one of those threads. So the question is: What EXACTLY is the shape? This is what I tested. For reference, all these tests were run by me and Azrael (friend of mine) on open multi, though that shouldn't matter. This is of course (STILL) version 1.03 of Diablo II, and yes, that's the German version (yikes, that translator added even MORE errors than the whole blizz north crew combined!). FIRST, we should find a scale. Pixels would do, but as the game is tile-based; in-game tiles are probably better. BTW, this should also give a better answer to the screen size-question. So I led Ezole to the Blood Moor and started dropping money. Well, that is, Ezole started to drop money. Lotsa piles of 1 gold each. Unlike in CD, in D2 you can drop items as often as you want; the game will ALWAYS find a spot for the item. The order in which it finds new spots resembles a diamond on screen. So, under the assumption that position is measured along the EW and NS directions, the next drop-spot is found by finding the free tile with the minimum l1 norm (l1[dx,dy] := dx +dy). That's fine, this isn't really a spell, so it does not really have to be circular. I continued dropping until much of the screen was covered, so that I could count off the tiles. This is not strictly necessary; one could simply do this for a few piles so as to be able to find the exact SIZE of each tile (in pixels), then calculate the screen-size (screen size in pixels is known). But I kept dropping, partly to see if there would be any surprises, partly because a large amount of gold piles looks really hypnotic (try that sometime, the recurrent spark effect every 4 seconds or so makes it look like a UFO landing site..). I dropped over a 1000 piles (!). Here is the result: OK. Next, you can load this into any image viewer and start counting off pixels. I did, and I found: - The tiles are organized along the diagonals, just like in CD
- Thus, each tile looks like a flattened diamond on screen.
- A tile is 32 pixels wide, and 16 pixels tall.
- I will from now on calculate most things in TILE UNITS (TU), this unit has the same size as a tile (32x16). Note that since the coordinates I give are horizontal and vertical, I will also have to use HALF TU to address all the tiles (e.g. the tile SE of the zero tile has the coordinates 0.5, 0.5). Sidenote: If one coordinate has .5 in it, so does the other coordinate.
- The visible screen is 640 pixels wide, and 432 pixels tall (except for a few pixels near the globes).
- That makes the screen 20 TU wide, and 27 TU tall.
- As Jarulf pointed out, in game units are 2/3 of a yard. Assuming that an in-game-unit is a TU, that would make the screen (13.3x18) yards. This isn't quite what VV (16x23) got, but it's better than to assume a TU is a yard, which would make the screen (20x27). The difference might be due to either a weird firewall implementation or even the way the firewall is shown on screen (where exactly does that end). For now, I'll assume that Jarulf's in-game-units are really TU's.
- Thus, 1 TU == 2/3 yard.
- This explains why it's generally easier for ranged characters to proceed directly N (or even S) than E or W. You can see much further in vertical direction. Mostly, of course, one has to follow the dungeon which is organized in diagonal direction.
- The exact CENTER of the screen is marked by the most N'erly pile just showing between Ezole's legs. In relation to her, it's located about half way between her knee and her hip, or thigh-center. This is important to know, because THIS is the point you need to left-click to walk to a specific location. In other words, when you click any point (tile, actually), your character will walk
there and stop so that the tile you clicked ends up in the exact center of the screen. - From the center point, you can see 10 TU to the right and left, 13.5 TU up and down.
- The initial drop point (where the first item falls) is NOT in the center (which is good, wouldn't be able to see the item). In the picture, Ezole's right toe is standing on a pile, the initial drop is the one one S of that. So the pile-diamond shown is NOT centered where Ezole is, it is actually shifted 0.5 TU left and 2.5 TU down. That's why the diamond just touches the top of the screen, but extends well over the bottom (if you kept count, it should extend by 5 TU, right?).
Oh, and I should mention that the shot was taken in NON-perspective mode. I always play non-perspective, simply because I can see more (area) and the game runs faster. Here is that same screenshot WITH perspective:
Aside from the neat aliasing effect (can't be helped), it's obvious that: - The viewed area is generally much smaller (probably about 20%).
- You can see a bit further to the N, but much less to the S. This could be exploited (by ranged characters) by switching the view depending on the direction they are heading. Probably too much work (D2 is too easy as it is).
- It's pretty much impossible to measure sizes in this mode.
So from now on, all screenshots will be taken with perspective OFF. OK. Now that we have established coordinates to measure things in, let's, uh, measure things. I'll start with holy frost. For this test, I brought in Agarvil, set him to be hostile to Ezole. I put him in a big empty space in the Blood Moor (not quite big enough, it turns out). I now dropped a pile of gold (you guessed it, 1 gold). This is the zero-marker. Then I put up holy freeze and after that left Agarvil alone to muse about the meaning of my life. With Ezole now, I tried all sorts of positions relative to Agarvil and, if within range of his aura, she would drop some gold. The idea was, of course, to find the most distant points where the aura would just work, and thus mark an outline of the area of influence. I removed piles that were clearly inside an area already marked off by other piles (they are otherwise in the way). When you try something similar, remember to start from the S or W, because the gold is dropped SW, and so it is impossible to proceed towards the SW (you'll just pick up the gold you just dropped, not walk anywhere). I do not guarantee to have found all the farthest away spots, in fact, you can quite often pick a better spot by simply looking at the symmetry. I didn't even do the whole 360 degrees, just about 180 (less, actually). But every position where you see a pile, that position is definitely inside the aura. Finally, because of the SW shift when dropping an item, the pile-trace is NOT the area where targets will be frozen in comparison with the paladin. Nevertheless, the size and shape of the aura can be estimated by comparing the pile-trace to the zero-marker. This whole experiment was done TWICE, once with a level 5 holy freeze (==6.6 yards, 10 TU), and then a level 10 holy freeze (==10 yards, 15 TU). Here are some screenshots: Agarvil's view: To see the rest, let's take Ezole's viewpoint, to the right: - UGH. If this is Blizz North's idea of a circle, that explains SEVERAL problems. (For instance, technically not by BN, but inspired by them nonetheless.)
- K, let's see. It's a star, isn't it? Wasn't really expecting circular, but perhaps round? Roundish? We'd settle for diamond-shaped? No? Sniff.
- For level 5 holy freeze, the highest point is (0,19) TU, the point furthest right is (19,0) TU. The diagonal point is (4.5,5.5) TU.
- For level 10 holy freeze, the highest point is (0,29) TU, the point furthest right is (29,0) TU. The diagonal points are (7,8) and (8, 7) TU.
- This matches well with the spells' stated sizes: Diagonal points (there are 4) are apparently determined by dx +dy = SIZE-1, end points (4 points) are determined by dx +dy = 2*SIZE -1. With straight lines between these points.
- Technically this is not a bug, it's a feature. The program doesn't crash, and after all, who ever said spells would have a round area of influence? It's just slightly, um, counterintuitive.
- I can only imagine what went wrong here. It's obvious that the correct formula (l2 norm: dx^2 +dy^2 <= SIZE^2) is too slow. And it's not THAT important to get this right. The l1 norm is an alternative, but this would create diamond-shaped areas of influence (just like the item drop area, above). So someone probably tried to improve the l1 formula, but messed it up. A pretty good formula might be something like:
dx +dy + 1/2 * |dx -dy| <= 3/2 * SIZE. This would yield an eight-cornered object (think tilted stop-sign) with a width and height of SIZE and the diagonal points extended by 1.5 (to fit exactly into the circle, it should be Sqrt[2]=1.41, but we don't need to be that exact). The formula actually installed is something along the lines of: dx +dy - 1/2 * |dx -dy| <= SIZE. Note the slight difference to the one above. - I did more (somewhat less rigorous) testing in other directions (not shown) and I am pretty convinced that the area of influence is indeed point-symmetric (as we'd expect).
- Drats! Ran out of space toward the top end point of the hf10 area. BN forgot to put in some area there, it's just a hole in the ground, what's up with that?
- Interesting side-tidbit: Holy freeze updates exactly every 2 seconds, and an aura stick keeps alive for exactly 8 seconds. This is true for player and monster targets on all difficulty levels, resistance has no effect. That's why when all the monsters are stuck with holy freeze, you can switch to another aura for at most 6 seconds, then you have to return to hf for at least 2 seconds. This aura flashing works better with a slightly higher level hf than necessary, because at low level the area is actually quite small (in relation to the screen, see above) and only reason most of the monsters are still affected is because of the long (8 second) stick, allowing them (or you) to move in and out of the actual freeze area.
Well, that was sobering; let's do static field, next. Similar setup, only this time Agarvil turned off his aura and just stood there. He's the professional victim (after all, he IS a pally). Then I brought in Elvira to static him some. Same procedure, whenever she'd get him, she'd drop some gold, and I'd try to find the outline of static field that way. The final shape should be no different from what you'd get if Elvira stood still and her victim moved around, dropping gold when hit. Elvira has a level 2 static field (4 yards, 6 TU). Agarvil sees this: Analysis: - Looks familiar, now. Same star as holy freeze.
- The top end point is at position (0,11) TU, the right end point (just off-screen) is at (11,0) TU, the diagonal points are (2.5,3.5) and (3.5,2.5) TU.
- Same formula as above (with SIZE==6).
- Even at low levels, static field thus reaches beyond the screen. If you know exactly where the target is, you can thus assassinate it from pretty far away (read, without the mob getting to shoot back). This is especially good against ranged monsters that don't see very far (Mephisto is a sucker for this tactic).
Next up, it's frost nova. Same thing as above, but this time Elvira used frost nova on Agarvil. It's a level 1 fn, but the spell has no range description anyways. Agarvil sees this: Analysis: - Hurray! It's round.
- This is more like what we expected. Not exactly round, but round enough to work the same in all directions.
- The right end point of the top flat of the spell is at position (3.5,8.5) TU, the top endpoint of the right flat of the spell (not shown) is at position (8.5,3.5) TU.
- Thus, the SIZE is probably 9 and the yardage of frost nova is 6 yards.
- It is not surprising, BTW, that frost nova is implemented differently from the true area effect spells. It needs to be, because frost nova is time-dependent. It's really 8 lines moving outward, and when a line hits a target, the target is chilled (at that moment). Whereas the true area effect spells affect ALL targets inside at the same time.
Summary: - The games uses diagonally aligned, diamond shaped tiles of 32x16 pixels. A TU corresponds to 2/3 yards (for spell effect purposes).
- The screen is (20x27) TU == (13.3x18) yards big.
- The instantaneous area-effect spells (holy freeze, static field) tested show a STAR, not a circle, as active area.
- The size of such an area-effect spell is the displayed yards * 3/2. The radius in horizontal or vertical direction is 2*SIZE -1. The radius in diagonal direction is 1/Sqrt[2] *(SIZE -1) == 0.707 *(SIZE -1).
- Frost nova works correctly, with a roughly circular area of influence of size 9 TU == 6 yards.
That still leaves some work (lot's and lot's, but it's too late for me tonight, and I probably won't get around to doing more testing till next weekend or so). Further testing: - Someone else should do similar tests, just to confirm my results (I might be completely off my rocker, here).
- Such tests could also be run with flamewall, for instance (i.e. don't rely on the visuals, cast it and then walk over and see when it starts to hurt).
- Such tests should be run with the necro's curses (for this you really need two people, one to click every 2 seconds or so (alternating curses when one connects), the other to walk the area and drop the gold. Everything else isn't going to be very precise (don't move that mouse!).
- The size of PEOPLE (and in fact, monsters) should be evaluated. Simple, just try to pack two characters as close as possible, then each drops a pile of gold, count off pixels, done. Repeat for 3-8 directions.
Someone (hi, Jarulf) could also look at the code and try to understand what actually going on. Sorry, I'm not being paid for this so won't fire up my Visual Studio. BTW, should we send this to BN as a bug? I didn't so far. I'm kind of afraid that would delay 1.04 even more. I privately believe it was pretty much done, and "in testing," as they said, when Truc discovered the bow bug. Then they fixed that and found that they had to rebalance the amazon, which requires more testing... They should be done soon, but if they fix this thing here, they'll have to rebalance the sorceress and the paladin. More testing required... You get my drift. On the other hand, maybe it's fixed already in 1.04? HA! Anyways, that's all folks, and -- I -- am -- outta here. Bolty's Note: Blizzard corrected the area of effect in Diablo II version 1.04. It was made circular in order to reflect the proper area one would expect when using these (and many other) skills. |