9
BOW
Almost all of this information was deduced by testing with arrows hitting perfectly vertical surfaces like walls or the sides of worms. When the collision is downwards or upwards the things are different and I haven't done enough tests about that yet, I owe you those, but meanwhile I've put together a lot of theories that work almost perfectly in-game and I hope you will find very useful (because I have).
Besides that, the image positing is being a bitch (never shows the real size image here at the forum, always liking you to their page) so I am sorry that all the images are displayed as thumbnails (I will try to find a solution at freeforums help forums).
Damage caused by each arrow: 15
Enables damage because of speed: No
Max number of targets you can hit with one shot: 3
The bow is very complex in the way it works (even more than kamikaze!) and it has taken me a lot of time to think of acceptable theories that explain the way the arrows behave, so this is going to be quite a theoretical chapter.
The first thing I'd like to show is how an arrow behaves when shot horizontally and doesn't hit a thing:
As you can see, the arrow literally disappears at the end of one frame and appears in another position in the next frame, so whenever you shoot an arrow it's collision mask trajectory is described by a set of "
predefined locations" that are
always the same in relation to the worm's position (when the angle and direction of the shot are the same, of course) and are connected by a 1-pixel-line, if there is a terrain pixel inside one of the "predefined locations" or inside the line connecting them the arrow will stop at the next frame, although not necessarily at the next "predefined location".
This is the basis of everything that comes next and I have to thanks Deadcode for
this explanation that gave me a lot of ideas that ended up in this chapter. It's worth to point out that this collision mask trajectory applies both to land pixels and worms, probably to mines and barrels as well.
So that's what happens when an arrow doesn't hit a thing, but what happens when it does?. Obviously it stops, and if it didn't hit a worm, a mine or a barrel it will remain as part of the terrain, except in very specific situations that I don't really understand. The only thing we can see in the game about the arrow collision is that in one frame the arrow is in mid air and in the next frame it has stopped, sometimes it digs deeper into the land, some other times it doesn't; sometimes it stops at one of the predefined locations and some other times it doesn't.
When each of these things happen depends on the
predefined locations of the trajectory, and a good way of understanding it is imagining what would happen between one frame and the next. First of all we will start with the simplest situation:
The arrow stopping at one of the "predefined locations"
This is what you can see in the game at one frame and at the next one, what "really" happens:
And this is a way of understanding how it happens:
At the animation above, the arrow hits the wall when it's first pixel is overlapping with the first pixel of the wall, then it checks if it is aligned with one of the "predefined locations" and since it is perfectly aligned it stops.
Now with the wall 2 pixels closer:
The arrow hits the wall when it's first pixel is overlapping with the first pixel of the wall, then it checks if it is aligned with one of the "predefined locations" and since it is still a few pixels behind it moves forward until it is perfectly aligned. It is important to make clear that in the game you can not see the arrow touching the wall and then digging until it stops because it doesn't really happen, this is just a way of graphically explaining the calculations that the game makes between the last 2 frames.
Now with the wall even closer:
The arrow hits the wall when it's first pixel column is overlapping with the first pixel column of the wall, then it checks if it is aligned with one of the "predefined locations" and since it is still a few pixels behind it moves forward until it is perfectly aligned. In this last situation the arrow moved forward 6 pixels after hitting the wall.
Seems easy so far, and now you already understand why sometimes the arrow digs deeper into the terrain and why some other times it stops as soon as it hits.
But let's see what happens when we put the wall one pixel closer:
The arrow hits the wall when it's first pixel column is overlapping with the first pixel column of the wall, then it checks if it is aligned with one of the predefined locations and since it is not it moves forward, but this time it doesn't stop at one of the predefined locations because it has already moved 6 pixels after hitting the wall and it can not dig any deeper into the land.
If we put the wall a bit closer the same thing will happen:
The arrow hits the wall when it's first pixel column is overlapping with the first pixel column of the wall, then it checks if it is aligned with one of the "predefined locations" but it is not so it moves forward, again this time it doesn't stop at one of the "predefined locations" because it has already moved 6 pixels after hitting the wall and it can not dig any deeper into the land.
The distance the arrow can dig into the wall after colliding is not always 6 pixels, it changes when you change the angle and also changes when you change the direction of the shot. As proved above that distance is 6 pixels for a horizontal shot to the right, but it is 7 pixels for a horizontal shot to the left and also changes depending on the angle: being 4 pixels for all the shots at maximum or minimum angles, except for the minimum angle to the left when it is 5 pixels.
Apparently it works in the exact same way when shooting a worm, the only thing that changes is that when hitting an object the arrow will disappear afterwards.
Although there are a few exceptions to this (like the case explained by Deadcode and other strange ones) to sum up what has been explained so far it can be said that
After colliding with a pixel, an arrow will keep moving until it has either reached one of the predefined locations of it's trajectory or dug a defined amount of pixels, being the collision point the moment when the first pixel of the arrow is overlapping with the land/worm pixel, and the amount of pixels it digs in depends on the angle and direction of the shot. This is very important because when the arrow does not stop at one of the predefined locations it has the ability to hit up to 3 worms, and because it means you can hit a worm through a wall no matter if the arrow stops at a predefined location or not. Being the latter a simpler situation it will be the first to be explained, but before that it'd be good to make clear that
once the arrow has stopped it is still able to hit another object if the collision masks are overlapping at any point.
As you can see above, the arrow doesn't hit the worm if the wall is not there because it's collision mask never touches the collision mask of the worm. But with the wall there the collision mask of the arrow when it stops is overlapping with the worm, so the worm gets hit and the arrow disappears.
So you can hit a worm with an arrow either by hitting it with a part of the trajectory (those predefined locations or the line connecting them) or with a part of the arrow collision mask after it has stopped.
Shooting worms through walls
You already know that an arrow has predefined locations in it's trajectory and that after hitting a pixel it will move a maximum of number pixels trying to reach the next predefined location. It is good to outline that in order to hit an object at least one of the pixels of the arrow has to be overlapping with one of the object's pixels, the same happens after the arrow has stopped. Putting all that together it is logical to think that if an arrow hits a wall, digs in and it's tip pokes out from the other side of the wall it will be able to hit a worm that is there.
Shooting multiple worms
Shooting two worms is somehow similar to shooting through walls, but in this case the arrow needs to stop at a point different than one of the predefined locations and you shoot a worm through another worm. What happens can be understood in this way:
So the arrow collides with the first worm and it is not aligned with one of the predefined locations so it moves forward, but it never reaches the predefined location and it stops when it has dug in the maximum number of pixels (in this case 6). At that point it is also hitting the second worm, so both worms get shot at the end of the frame.
Then hitting 2 worms is relatively easy, but in order to hit 3 worms (excluding your worm) the two that first get hit need to have the pixels that will collide with the arrow overlapped and perfectly aligned. So if there is a group of three or more worms that could get shot but the first worms of the group are not perfectly aligned, the arrow will hit only two of them. Which ones is something that seems to be random in contrast to when you shoot only one worm out of a group (this will be explained later).
Shooting multiple worms through walls
For this you will need not only the arrow to be poking out of the other side of the wall when it stops but also it must not stop at one of the predefined locations, then it will be able to hit up to 2 worms, probably because the wall counts as the third collision.
"Fusion shots"
I never knew how to call this move until one day SirGorash said "you love doing those fusion shots" and I found it an accurate way of describing the move where you shoot while you are at least partially "inside" the other worm (the collision mask of the worms are overlapping by at least one pixel).
If you check the first frame when you use the bow you will see that in the first frame the arrow is really touching your worm:
But for some reason it just won't hit you (gladly, otherwise your worm would get hit every time you use the bow
), but it is still able to hit another worm if it touches it. So in the same way that a worm standing right in front of you will get hit by the tip of the arrow, a worm standing almost behind you will get hit by the tail of the arrow.
So in order to perform a "fusion shot" you only need the arrow at the first frame to hit the worm even if it is with the very end of it's tail.
I thought that you might find useful knowing exactly where the arrow is during that first frame for different angles, so here it goes:
When you shoot to the right, the worm you can hit can be farther from you than when you shoot to the left.
But if the arrow is touching your worm, why doesn't it get hit?, because after colliding with the worm you are shooting the arrow is perfectly aligned with the first predefined location, then when it stops it is able to hit only one worm and it has been programmed so that the worm being hit is not yours.
Shooting yourself
Sometimes useful, sometimes not, what matters is that it happens. We've seen that the arrow starts from inside your worm, therefore if when it stops if hasn't yet gone outside it will hit you under most circumstances. The simplest case is when you shoot a wall that is too close, and no matter if the arrow stops at one of the predefined locations or not the worm gets hit because it is touching the arrow when it stops.
Unlike with the fusion shots where your worm is literally immune to your own arrow, whenever you shoot against a wall if the arrow stops at a predefined location and it reaches you you will get hurt. Even if there are other worms touching the arrow you will be the one getting hit, as seen below:
It is curious that when the arrow does not stop at one of the predefined locations you won't get hit if there are at least two other worms touching it. But if there is one worm or no worms you will be shooting yourself:
Of course that shooting against a wall is not the only way to hit your own worm, we all know that sometimes it happens when you are aiming to other worms. Remember that with "fusion shots" or when shooting a worm that is very close the arrow stops at one of the predefined locations touching your own worm but you still don't get hit, and it is always like that, yet there are some situations where you shoot another worm, the arrow does not stop at one of the predefined locations and it ends up touching your worm, and that is how you get hit by the arrow.
Just like when shooting multiple worms through a wall, the arrow won't hit your worm even if you are touching the arrow after it stopped and there are other enough. The only difference here is that enough targets means 3 other worms (even if the third worm doesn't get hit) instead of 2 other worms plus the wall. Although under some circumstances (when shooting up-left) two worms will be enough.
Shooting one worm out of a group
If you want to shoot only one worm then you certainly need the arrow to stop at one of the predefined locations, and the easiest way of achieving that is being as close as possible to your target. If the arrow touches more than one worm, which one of the group gets shot usually depends on which worm performed the last action, being that worm the last that will be shot. For example if worm A walks, then worm B moves to the same place worm A was and then worm C does the same the first worm getting shot will be A, then B and then C. When you use a weapon on another worm and then hide with it, the worm being shot by the arrow will be the one who performed the shot unless it damaged both worms (then the one who performed the shot will dodge the arrow).
This last animation shows again how the arrow behaves in a horizontal shot to the right at different distances from the target.
The numbers indicate the distance between you and the target, red ones when the arrow does not stop at a predefined location and green ones when it does. As you can see 9 pixels is the closest you can be to a wall if you don't want to hit yourself, also the closest you can be to a group of worms if you want to shoot more than one of them. Then if you are 9 to 21 pixels away from the first worm, and the second one isn't more than 7 pixels behind it, you will be hitting both. Between 22 and 28 you will be able to hit only one, between 29 and 41 up to three worms again, and the cycle repeats every 20 pixels. I'll let you find out the distances for other angles, shouldn't be hard given all the information above
, just watch out when shooting up-right, the arrow has a few bugs in that direction and angle.
There is one last kind of move, when you shoot a worm and a piece of land but the arrow doesn't disappear after hitting the worm, but I haven't yet been able to reproduce it except in one special case that is nearly impossible to achieve in a real game without a huge strike of luck.
Well then, this is a lot of information about the bow, even though it is probably not even half of the whole thing :S, feel free to move on with the testing
.