Worm Center

Replays, screenshots and anything that can help players getting better
Post Reply
Balee
Posts: 1
Joined: Sat Mar 07, 2009 2:42 pm

Worm Center

Post by Balee »

To Dario: I've read your worms guide here, and while it is a very thorough and neat, I would like to point out something that seems to be some sort of a miscalculation.

In your "Explosions generalities" part you made a picture showing the center of the worm's collision mask. The error occurs because you magnified the worm's pixels so that one pixel becomes a 2x2 square, while determining the center with normal, 1 pixel wide line. This way the center you point out in the picture is false, since it wouldn't be just 1 pixel, but two half-pixels. I have edited the picture so it can clearly be seen what I'm talking about. I have divided the original "center pixel" into the two halves, one cyan and one ochre.

Image

Furthermore, if you look at the purple lines on the top and bottom, which show the line where this kind of center determination should originate from, it can be clearly seen that this, in fact, would indicate that the center pixel consists of four quarter-pixels, which is wrong again.
Before I read your guide I was making some experminents as well, and I came across this problem: most likely there is no exact, one-pixel sized center of the mask. One can't determine it using a 16x16 square (as the mask is 16px high), because the mask's width (9px) makes the calculation incorrect.
I, personally, am thinking that the center is probably two pixels, the ones that can be found if you connect the opposite corners of the 16x9 rectangle, but this is yet to be proven.

If I'm wrong, made some mistake in this counter-theory, or something, please tell me :)
Dario
NNN member
Posts: 1408
Joined: Sat Nov 24, 2007 11:59 pm

Post by Dario »

I never made a real theory about the centre of the worm, the only goal with that graphic is to give players an idea of where the centre of the worm can be found behind the graphics mask, in an amplified worm (so that it is easier to see) and with a 1 pixel width line (because 2 pixels width looks too awfully thick ;) ). Determining how thick the centre of the worm really is was never my intention, but if you want to find that out this is a clue:
-Given the clearly high effect of sub-pixel alignment on the worms trajectory when you are working with powerful explosions it is logical to assume that there isn't a central area, but a single dot (with the mathematical definition of dot) that is as far from the right edge as from the left edge (the same for the upper and lower edge), where the unit of the distances is 1/65536 pixels.
Still maybe the easiest way of knowing about such details is simply asking Deadcode.
Post Reply