The worms guide

Replays, screenshots and anything that can help players getting better
Locked
Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

The worms guide

Post by Dario » Sun Nov 25, 2007 1:06 am

This is a project I started around September of 2007 in an attempt of gathering all the knowledge I can in one place. It might take a very long time but I am willing to go on until I feel it is finished.
To keep it neat this thread will be always locked, so if you wish to ask suggest or comment something about it just create a new thread.

I strongly suggest you read "Jumping and pixel alignment" and "speed damage", since those contain information that will be used in the description of many other aspects of the game.

Index:
1-Speed damage
2-Jumping and Pixel alignment
3-Physics: worms flying and bouncing
4-Kamikaze
5-Dragon Ball
6-Fire Punch
7-Jet Pack (dec 9th 2007)
8-Explosion generalities (jan 15th 2008)
9-Bow (sep 6th 2008)

Because Images are not being loaded properly and I am too lazy to re-upload them, just download the attached file and open home.html to start browsing the guide. Many weapons are missing and it might stay like that for a long time :P.
Attachments
Worms Normal School up.rar
(3.23 MiB) Downloaded 305 times
Last edited by Dario on Sat Sep 06, 2008 4:25 pm, edited 4 times in total.

Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

Speed damage

Post by Dario » Sun Nov 25, 2007 1:14 am

1
SPEED DAMAGE


Everybody knows about fall damage, right?, it happens when a worm hits a pixel from above with enough vertical speed. You probably also know that some weapons do not cause direct fall damage, and you need to make the worm bounce on something to make it succeptible of getting fall damage. For example with a dinamite that can cause up to 72 direct damage in the head of a worm, it doesn't matter how high in the air the worm goes, when it lands it won't get any fall damage, unless it bounces on a wall.
But maybe you didn't know that it can also happen when a worm hits the ceiling with enough vertical speed, this is why I am going to refer to it as "speed damage" instead of "fall damage". Then for speed damage to happen you need 3 things:
1- A worm succeptible to speed damage
2- The vertical component of the speed has to be high enough
3- Hit a horizontal surface of a pixel

As I mentioned before, many weapons (dinamite, mines, granade, etc) do not make the worm succeptible to speed damage, then there are some sure ways of turning the worm into that state:
:arrow: Make it slide on the floor before falling
:arrow: Make it hit one of the vertical faces of a pixel
:arrow: Make it hit another worm

Note that I didn't mention making the worm hit the ceiling, because that does not turn the worm succeptible to speed damage unless it hits a side of a pixel. However, I have seen some very rare cases of worms getting speed damage when they shouldn't, and not getting speed damage when they should.

There isn't much more to explain about it, so here is a .gif showing speed damage when the worm hits the ceiling:
The blood coming out of the worms indicates when they gets damaged. I slowed down a frame in which the worm has just hit the wall at his left. This doesn't cause any damage, but it makes the worm succeptible to getting speed damage. One frame later the worm hits the ceiling and I pointed the blood with a green arrow.

Image lost.

Now this is an example of how not to look for enabling speed damage:
The worm is not getting any damage when hitting the ceiling because it is not yet succeptible to it, and since it never hits a side of a pixel, the worm won't get any speed damage when landing, no matter how big the fall is. Of course that if at one point it slides or bounces it will become succeptible to speed damage.

Image lost.

I hope that you've learnt something out of this. And if you already knew it all I hope you at least enjoyed the animations.

Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

Jumping and pixel alignment

Post by Dario » Sun Nov 25, 2007 1:16 am

2
JUMPING AND PIXEL ALIGNMENT


Straight to the point, I'll start with jumping basics:
forward jump: (enter)
back jump: (backspace, enter) or (enter, enter) or (backspace, backspace, enter).Even though one of them looks different, they are all exaclty the same. Sometimes the enter key fails or the turn time ends right after you pressed the first key and before you press the last one, as a result you might end jumping away from a good hide or even into the water!. In order to avoid such potentially harmful mistake you should always use the (backspace, enter) formula.
simple jump: (backspace)
backflip: (backspace, backspace)

Image

:idea: But many times it looks like none of these jumps are what you need, in such situation you should remember that worms can bounce and maybe there is a way to jump where you need!.

Image

:arrow: A very important thing when playing is to know with certain precision where your worm is standing, especially when you are walking on the edge or you need to jump with/without bouncing on the terrain and missing could cost you the turn.
So maybe some of you have noticed that when you walk down a pixel you can make 4 minimum arrow taps before falling off the pixel. A minumum tap means that you press a key for a very short time, but it is long enough for the game to recognize that a key is being pressed. The 4 steps I am talking about go like this:
initial taps: the base of the worm collition mask is still above the pixel, the worm moves forward.
1st tap: your worm moves down and forward
2cd tap: your worm moves forward
3d tap: your worm moves down and forward
4th: your worm moves forward
next tap: your worm moves forward and falls off the pixel.

Image

:arrow: Remembering that is very useful when you need to know if you can make an extra step before falling, but keep in mind that if the border is too steep there may be less than 4 possible steps, since you never get to be fully on top of the last pixel.
:arrow: It is also a very good way to see when you can make a backflip without boucing on the land: just make small steps until you see that the worm moves forward but not down, then you will be in a palce where you can probably make a safe backflip.

Image


:idea: Something similar happens when you are walking on the head of another worm, but due to the shape of the head you can make 6 taps and will fall in the 7th. The place "0" would be when you are completely on the top of the head of the other worm, then you have places 1, 2, 3, 4, 5 and 6, and the next step you fall off the worm. I mention this because it will be useful when talking about some weapons.

:arrow: Another issue that many times troubles us is worms getting stuck in a place they just can't walk out. In a very simple way of saying it, this is caused because the minimum width of a hole through which a worm can climb is smaller than the minimum width through which a worm can walk down. For example a worm can climb through a hole that is 8 pixels wide, but it can only walk down through a hole that is 9 pixels wide or more. Whenever you get stuck there is a chance that by using the jetpack or the rope you will manage to set your worm free, but you risk wasting a valuable utility.

Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

Worms flying and bouncing

Post by Dario » Sun Nov 25, 2007 1:25 am

3
PHYSICS: WORMS FLYING AND BOUNCING


"The angle of incidence equals the angle of reflection".You've all heard it in a physics class, even if you weren't listening.
But worm's physics isn't like real world physics!!, resulting in people saying things like "WTF, why did it bounce like that?" or "No way that happened, I am so unlucky!". Guess what, you are not unlucky, you just don't know enough.

All my calculations were done assuming that the formula and standard gravity given at http://worms2d.info/Physics_Engine are correct. Gladly everything seems to match perfectly using that data.

First of all, in case someone don't know, worms never (unless with chute) are affected by wind. Then the only things that define the height and length of a clean flight are gravity, the initial vertical speed and the horizontal speed. Beware that the latter never changes during a clean flight, hence it is quite simple to predict what will happen if there are no obstacles.
In addition to that very well known fact thre are several things that can modify a worm's involuntary movement (meaning that it is not due to walking):

:arrow: Low Gravity reduces gravity by 50%, consequently the height a worm reaches after being propelled under normal gravity will get doubled with Low Gravity.

:arrow: When a worm hits a horizontal surface, it's vertical speed gets reduced to 0 (there is no bouncing effect). It will also lose 4% of it's horizontal speed due to the friction during the single frame the worm is in contact with the surface. This makes the effect of worms hitting the ceiling not very well understood by players, since we are used to seeing things in the real world bounce in an angle very similar to the angle of incidence. And of course, no matter how fast you send a worm towards the floor, it will never bounce up, not even a bit.
I made this image and highlighted 3 different trayectories that show how the worm loses it's vertical speed when it hits the ceiling, and then starts falling down due to gravity.

Image lost.

:arrow: When a worm hits a vertical surface it's horizontal direction gets inversed and speed reduced by 40% (the worm bounces with 60% of the previous speed). It will also lose 4% of it's vertical speed due to the friction during the single frame the worm is in contact with the surface. Therefore the angle of bouncing will be closer to the vertical than the angle of incidence. In the image below, the effect of gravity in the trayectory is meaningless because I used a highly powered up bat.

Image lost.


:arrow: Worms sliding can only climb 1 pixel heights, therefore they can't slide on a hill steeper than 45%. This applies both to the floor and the ceiling and if the worm sliding encounters an obstacle of 2 pixels or taller it will bounce. This ability to climb a pixel only happens in horizontal movement, because if the movement is vertical a 1 pixel obstacle will reduce the vertical speed down to 0.

:arrow: A worm sliding on a horizontal or vertical surface gets a speed penalty of 4% (friction= 0.96) for every tick in contact with the surface. Keep in mind that the only way a worm can get friction from a vertical wall is by hitting it, then the worm will bounce, therefore the maximum and minimum ammount of time a worm can be in contact with a vertical surface is allways one tick.

:arrow: On horizontal surfaces this friction will apply until the worm is moving slow enough for it to stop sliding and stand up.

:arrow: According to a page at the worms knowledge base (http://worms2d.info/Physics_Engine) Low Gravity reduces friction down to 1% per tick. But I found no evidence of Low Gravity having any effect on the friction or the speed penalty of climbing a pixel.

:arrow: When a sliding worm climbs a pixel it gets a horizontal speed penalty that is much greater than regular friction.

:arrow: There is a very weird effect when worms are sliding uphills: if they are sliding fast enough and, for some reason, they lose contact with the oblicuous surface they will re-gain some of the speed lost during the sliding. Check these .gif, each frame is one tick of the game and all the frames of each .gif have the same timing, so the speed changes seen here are 100% real.
These are 45
Last edited by Dario on Sun Nov 25, 2007 1:51 am, edited 1 time in total.

Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

Kamikaze

Post by Dario » Sun Nov 25, 2007 1:49 am

4
KAMIKAZE


This is my favourite weapon, and the most complex in my opinion. It is very versatile and it requires a lot of skills, but mainly creativity to take the maximum out of it.
The key to getting good with this awesome weapon, is completely understanding how it works and I am going to try explaining it as well as I can.

Max direct damage without explosion: 30
Max total direct damage: 56 is the highest I've ever achieved in controlled situations.
Direct damage because of speed: Yes for the linear stage, no for the explosion.
:!: With the linear stage strike and the explosion combined you can get up to 15 speed damage in the most favorable situation, for a total of 71 damage without needing a fall.
:!: Without the explosion you can get 1 speed damage if the attacked worm is in a narrow hole (for example a blowtorch tunnel).

The most important thing you need to remember in order to understand it, is that kamikaze at power 3 won't explode unless it has some land to do it, and I mean land or indestructible borders. Other worms, mines and barrels do not make kamikaze explode. It just doesn't explode without land unless it goes beyond the map limits, and that is the way it is.
With that clear now you have to understand that there is a period of time/distance during which the worm will go through everything that is destructible, leaving a linear hole in the land (linear terrain damage stage). But this can't go on forever, so there is a moment when the worm starts being succeptible to exploding (the "no linear terrain damage" stage). When the worm is succeptible to exploding, before initiating the exploding sequence it has to touch land, if there is no land to initiate the explosion, the worm will go on until he finds some land or he plops/goes outside the map limits. Once the worm has touched land, it will go forward a bit more (without making a hole) and then will explode, making a round hole. That little period during which the worm is still going forward but has stopped making a hole is very important, because if the worm reaches the water during this stage, it will plop before exploding, and since it had already stoped making the linear hole, it won't be connected to the water.

In the next animation and image the 3 stages of the kamikaze are shown.
:arrow: In the linear terrain damage stage, the terrain to the sides of the kamikaze gets brown, indicating terrain damage. During this stage the worm will go through everything that is destructible.
:arrow: Then you can see the terrain damage ceases, the "no terrain damage" stage. The worm now is succeptible to exploding, but it will not explode until it touches a pixel.
:arrow: In the final stage, when it has touched a pixel, the worm will go forward a bit more, without making a hole, and then it will explode. I edited some frames to show the pixel wall that triggered the explosion, pointing it with a red arrow.

Images lost.

:idea: You can't normally see the pixel wall not getting damaged, but it is very important that you understand it doesn't dissapear until the worm explodes. That is why you can make a kamikaze towards the water without making a plop-hole. The following animation shows that weird effect, note that the hole does not connect to the water because the worm plopped after the "linear terrain damage" stage finished, but before exploding. So if you are going to try plopping a worm by making a hole to the water, make sure that you are far enough for your worm to explode before plopping, or close enough for your worm to dive into the water before the digging period/distance is over.

Image lost.

As you can see below, the worm plops after the linear terrain damage stage finished, but before it explodes.

Image lost.


So that is regarding the length of the kami, but there are some other things you should know about it:
:arrow: During the linear stage, the kamikaze will not hit moving worms. That is why if you lift a worm by jumping and then activate kamikaze, that worm won't be hit; the same happens if you blow a barrel that moves a worm before you reach him with kamikaze. If the worm is still moving when you reach him with the kami, you will go through without hitting him. Of course that since the explosion works like a regular explosion, you can hit moving worms with it, that is why you can cause so much damage when you aim it correctly.
:arrow: When you hit a worm during the linear stage it causes 30 initial damage, and the direction in which that worm is sent depends only on the direction you are facing before you activate kami. If you are facing right, all the worms you hit will initially be propelled to the right.

Image lost.

:arrow: The explosion works just as all other explosions, it can hit moving woms and the direction worms are propelled depends on where the explosion happened in relation to the worm.

Now that you understand how it works, you have to OPEN YOUR MIND!!. Using the different stages for different purposes, using the linear part to propel worms into the air, or only the explosion, or both for a huge flight; the possibilities are illimited!!.
These are 2 small animations of the kind of things you can achieve if you open your mind, and you can also download the attachment that contains some replays of kamikazes in real games.

Images lost.

:!: I wanted to add some more practical tips for kamikaze, so I made a small update that shows how close/far to a worm the kamikaze has to pass in order to hit him.
:arrow: This first picture shows quite accurately how close worms have to be to the axis of the kamikaze in order to get hit. If they are a bit further there is a big chance of missing.
Image

:idea: With this picture in your mind and using the edges of the screen to aling worms, there are very little chances of missing.

So that was when the kamikaze starts a certain distance from the worm you want to hit, but sometimes you need to stand on the enemy worm or very close to it, then you will have to remember when I mentioned that when you are walking down a worm, you can make 6 steps and in the 7th you'll fall off the worm (check the post: "2-Jumping and pixel alingment").
:arrow: Then, when you want to kamikaze upwards, you have to be standing in the spot number "5" (number one is the first tap that makes your worm move down a bit), or lower than 5. You can even walk up to 14 pixels away from the worm you want to hit (check the pixture above) and you will still hit it, but if you go higher in the head of the worm you will miss.
Image


:arrow: When you want to kamikaze horizontally you have to be standing in the spot number "4" or higher; if you walk down a bit more, you won't hit him (unless you aim to the other side, of course).
Image


:arrow: When you want to kamikaze in an ascending diagonal, you have to be standing in the spot number "1" or lower, and you can even walk 6 pixels away from the worm for any kind of diagonal kami, but if you climb higher than the spot number "1" an ascending diagonal kamikaze will not hit the worm.
Image

Ok then, I think this is enough information about kamikaze, the rest is up to you :) .
Last edited by Dario on Mon Sep 01, 2008 7:09 pm, edited 1 time in total.

Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

Dragon Ball

Post by Dario » Sun Nov 25, 2007 1:50 am

5
DRAGON BALL


Max direct damage: 30
Direct damage because of speed: yes. Even though the initial speed isn't enough, a worm hit by the Dragon Ball is succeptible to speed damage without having to slide or hit a wall.

:arrow: Unlike the Fire Punch, this one is only capable of hitting one worm one time. In addition, the Dragon Ball can hit moving worms, which allows us to do the well known bakcflip lift + DragonBall shown in the .gif below.
:idea: Note that the speed you give to the worm when you lift it is added to the effect of the Dragon Ball. Therefore the sooner you hit the worm after lifting it, the higher it will go.
Image


:arrow: The next one is an image that shows several things about the Dragon Ball at the same time. First of all it shows the maximum horizontal and vertical distance to your target, so if the worm at the top right moves a bit farther or a bit higher it will escape the range of the Dragon Ball.
Image

Then why the first worm didn't get hit?, it was at the same hieght the other worm standing on the grider was, but it was too close. Hence, if you are standing on the head of the worm you want to hit, you won't hit it unless you walk back to the spot "3" or lower (check: 2-Jumping and pixel alingment), only then you will be far enough from your target.
Image


:arrow: Another quite technical but still awesome thing about the Dragon Ball is that it can only collide with land in very specific spots of it's trayectory. Anyway it is pointless to keep explaining with words something that an image can explain much better.
Image


:idea: Now you know that you can fire the Dragon Ball through very very thin holes, and if you stand adyacent to a wall 5 pixels wide you can even fire through it!.

Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

Fire Punch

Post by Dario » Sun Nov 25, 2007 1:51 am

6
FIRE PUNCH


Max direct damage: 30 per hit
Direct damage because of speed: yes

:arrow: The Fire Punch really looks like a very simple weapon, doesn't it?, you just activate it and the worm punches whatever is in front of him, even mines and barrels, but not crates (it will grab them instead of destroying them). Basically that is correct, but this weapon has several interesting features.
First of all, the firepunch can hit any number of different targets in the same turn as long as they are all inside the area of effect and are standing still. That is why you can't perform the well known lift+DragonBall trick, the worm that is in the air is moving and Fire Punch can not hit moving targets. This normally makes it really hard to hit a worm more than once, but if the punched worm ceases his movement before he has got out of the area of effect, the Fire Punch will hit him again!.
Image
:!: The maximum number of hits I've got without low gravity is 4 (quite hard though), with it up to 6.
:idea: Remember that your punch must not break the land that is holding the other worm blocked, otherwise the multiple punch attemp will most likely fail.

:arrow: Another thing you will find useful sooner or later is to know with certain precision the area of effect of the Fire Punch. The next picures shows that (the 4 worms in the corners), in addition to the hole left by the firepunch in the land (note that it starts more or less at half the height of the worm and not from the lowest part of it) and the damage that can be caused to blocked worms at different heights.
Image

:arrow: And this is the damage ladder for a Fire Punch when Low gravity is on:
Image

:!: The better the block, the easier it is to multiple punch a worm!. In the three pictures above, the worms were blocked as tightly as it is possible.

:arrow: Knowing this, you can punch worms that seem to be too far away from eachother, just remember that if you want to hit a worm behind of yours you will have to be standing at the spot number 5 or higher on his head.
Image

:arrow: A little annomality happens when the worm you want to hit hasn't moved since the begining of the round. In this case you will need to be at the spot number 4 or higher in order to hit the worm behind of yours.

:idea: You have surely noticed that the Fire Punch will hit objects that are beyond the limits of the hole created in the land, allowing us not only to hit another worm without opening a hole between you and your enemy, but also to hit mines without activating them if you are far enough.
Image

Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

Jet Pack

Post by Dario » Sun Dec 09, 2007 5:39 pm

7
JET PACK


:arrow: The hotkey is the one under "esc", to the left of "1" and imediately above "tab", key that can also be used to select low gravity or any other utility.
Here you will find a brief list of facts and tips for 2 aspects of Jet Pack-ing: fuel saving and flying and landing, suiciding and worm knocking.

Fuel saving and flying

:arrow: When you are flying in an open space and you just want to go forward, stop pressing the side (<- ->) arrows as soon as you have reached the maximum horizontal speed. Not doing this is probably the mistake I've seen more often.
Jetpack has a limit in the speed it can reach in all the possible directions, and since in mid air there is no friction, holding a side arrow when you have already reached the maximum horizontal speed is a complete waste of fuel.

:arrow: Reaching the maximum speed is actually quite fast, if you start being still and press up and left or right at the same time, you will reach both vertical and horizontal maximum speed by the time you used a total of 6 or 8 fuel. So yes, it takes about 3 or 4 fuel to reach the maximum horizontal speed and 3 or 4 fuel to reach the maximum ascending speed.
Therefore, holding the up arrow all the time is also a waste of fuel that is more evident when you want to cover the maximum possible horizontal distance with the fuel you have.

:arrow: Consequently, a technique that will allow you to cover larger distances using less fuel is the following when you start being still:
1-Hold the up arrow and the side arrow until you have used between 6 and 8 fuel
2-Release both arrows and wait a moment
3-Hold the up arrow again until you have used 3 or 4 fuel
4-Release the key and wait a moment
5-Repeat the last 2 steps until you have reached the point from which you will simply let yourself fall and land on the spot you wanted to land without using any more fuel.
Image

:arrow: It is usually better to fly slow and don't lose time bouncing around without control. Don't panic, go slower, you will probably move farther and faster if you don't waste time and fuel on misses simply because you can't control the Jet Pack. This is specially remarkable during the retreat time when players tend to panic and press both arrows all the time because there is no fuel limit, just move slower and you will end up going faster.

:arrow: When you are going fast enough and you need to start flying in the oposite way, you better look for something to bounce on, otherwise you will have to spend a lot of fuel on turning around.
Image

:arrow: Sometimes the terrain just won't allow flying and you will be forced to slide on a surface, in this case the faster you go the less chances of bouncing on a pixel of the floor.
Image

Landing, suiciding and worm knocking.

:arrow: There are three other very important things that you should know and master:
1-When you are flying and the fuel or the time expire, the Jet Pack will be removed and the worm will start a flight according to the speed it had on the Jet Pack.
2-When you deactivate the Jet Pack by pressing the space bar, the horizontal speed of the worm will be set to 0 and the worm will fall straight down. Yet the vertical speed at the moment you deactivate the jet Pack will be the same as while you were on it.
3-A worm that has released the Jet Pack will never slide unless you lose control of the worm because of falling speed.

:arrow: Hence, if you are about to run out of fuel or time and it looks like you will not reach the plataform you wanted to, give yourself an extra impulse and you might get there. Or if you have to land on a very small surface, press the spacebar when you are right above it to make sure you will not miss your target.

:arrow: As said before, a worm that has released the Jet Pack will not slide nor get fall damage unless it is moving fast enough. Remember that the vertical speed you had while you were on the Jet is kept by the worm when you let it go, therefore the faster you are falling while you are on the jet the less the extra height needed to get enough falling speed (that also causes damage when hitting the floor) after the jet is turned off.

:arrow: If you want to knock a worm you will have to synchronize your flight with your fuel or with the retreat time, so that at the moment the Jet Pack expires your worm will be in the spot and have the speed necesary to knock the worm you want. Normally the destiny of your worm will be the same of the one you knocked but, just like with rope knocks, sometimes you can save your worm.
Image

:arrow: Sometimes you need a precise "toing" instead of a knock, in that situation it is usually better to deactivate the jetpack manually (by pressing spacebar) in order to get a perfectly straight fall.
Image
Last edited by Dario on Mon Sep 01, 2008 11:52 pm, edited 3 times in total.

Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

Explosions generalities

Post by Dario » Fri Feb 15, 2008 6:42 pm

8
Explosions generalities


:arrow: Have you ever noticed that when you put a dinamite on the head of a worm and it explodes, the worm is sent up and not downwards? And not only for dinamite, you have probably noticed it is also like that for mines, cows, pidgeon, sheep, granny, holyhand grenade and worms self explosion. Or maybe you have been wondering why the HHG on the head of a worm will cause 87 damage even though the max damage of the weapon is 100.
If you haven't seen that, it won't be hard to if you pay attention to the holes created in the terrain by different weapons during a game, but I am going to make it easier:
Image

:arrow: Can you see how the center of the explosion is not the center of the weapon's image?, even for the grenade it is a bit lower than the grenade itself. But this doesn't happen with every weapon, for proyectiles like the zooke and the homming the center of the explosion matches with the point the weapon touched land. Having this in mind it becomes a lot easier to predict what is going to happen when the weapon explodes, including how much damage will be caused, the place of the hole and the way the worms will fly away.
If you like a definition of it we can say that the damage caused to a worm and the direction it is sent by an explosion dependes on where is the center of the explosion respectively to the center of the worm.
So now you need to know where is the center of a worm, for that you must know what the worm collition mask looks like. Check this picture:
Image

:idea: The image shows the worm collition mask for worms in different states. The collition mask is the empty space delimited by the red lines, and the red spot with the green cross points the center of it. This collition mask is allways of that shape, size and orientation, no matter what the worm is doing.

:arrow: Just in case it is not clear enough I made this image that explains it all:
Image

Dario
NNN member
Posts: 1332
Joined: Sat Nov 24, 2007 11:59 pm

9-bow

Post by Dario » Sat Sep 06, 2008 5:09 pm

9
BOW


:idea: 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

:arrow: 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:
Image
:idea: 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.

:arrow: 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"
:arrow: This is what you can see in the game at one frame and at the next one, what "really" happens:
Image
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.

:arrow: Now with the wall 2 pixels closer:
Image
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.

:arrow: Now with the wall even closer:
Image
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.

:arrow: But let's see what happens when we put the wall one pixel closer:
Image
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.

:arrow: If we put the wall a bit closer the same thing will happen:
Image
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.

:idea: 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.
Image
:!: 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.

:arrow: 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.
Image
:idea: 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
:arrow: 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.
Image

Shooting multiple worms
:arrow: 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:
Image
:idea: 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
:arrow: 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.
Image

"Fusion shots"
:arrow: 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:
Image
But for some reason it just won't hit you (gladly, otherwise your worm would get hit every time you use the bow :P), 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.
Image
:idea: 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.

:arrow: I thought that you might find useful knowing exactly where the arrow is during that first frame for different angles, so here it goes:
Image
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
:arrow: 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:
Image

:idea: 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:
Image

:arrow: 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.
Image
:idea: 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
:arrow: 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).

:arrow: This last animation shows again how the arrow behaves in a horizontal shot to the right at different distances from the target.
Image
:idea: 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.

:arrow: 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 :P.

Locked

Who is online

Users browsing this forum: No registered users and 1 guest