PDA

View Full Version : maybe not here...but I think it's the best place to ask my question


Kyo
26 Jul 2011, 13:06
Hello,everyone...Sorry for throwing my question at first.Because it's a bit...complicated.My question is "How is the collision system working in worms2D".

I guess maybe somebody is laughing...A strange question and a little poor English, right? In fact I had become a worms-fan when I was a kid...since the day my cousin showed it to me.Now, I learn in Japan Electronics College(Major in Game Software).And I just want to make something intersing or do something useful during my summer holiday.I went to the largest book shop and find nothing(or maybe I just missed it), I even do not know what it is called.I mean it's a magic to destroy the mapchips to pieces and still keep their collision...

So, it will be so kind of someone tell me some methods or algorithms or just some keywords for me to find the way.Anyway, maybe it's just something about the business,but thank you all the same for reading my words.


Join #worms on GameSurge.
http://worms2d.info/Worms_on_GameSurge

Look out for Deadcode and CyberShadow and ask away!
Those nice chaps have the source code for Worms Armageddon and know virtually everything about the ins and outs of the 2nd generation of Worms games (W2, WA, WWP).

You'll also find a lot of other knowledgeable people from the community who have intensively tinkered with Worms games and can tell you something.


The Worms 2 engine used for Worms Armageddon and Worms World Party is a pixel-based engine.

Every object in the game (grenade, worm, MB Bomb, oil barrel, mine, etc.) has a collision mask as defined by this image (http://lex.clansfx.co.uk/worms/masks.png), which can be found in the game's sprite directory (http://worms2d.info/Graphics_directory).

Collision occurs by each object checking if there would be a solid pixel inside its collision mask in the next frame of its motion vector.

When collision occurs, the object decides which event to perform (bounce, explode, slide, etc.) based on its state. If it's supposed to bounce, the object checks the angle of its current motion vector against the angle of the surface (which, in this case, can only be flat vertical or horizontal due to the nature of W2's pixel engine).

Walking and standing acts somewhat differently. Here's an explanation of that: http://worms2d.info/Worm_Walking.


Thank you for the answers...The masks, I think it's something like... photoshop does, right? My classmates and I had a discussion on the pixel-based system, though my teachers said that a pixel-based engine is too heavy to run.But now I know that they maybe just want things to be easy.Now I'll do something they never do. And also, I'll make full use of that directory to learn how to make my game. GameSurge...I think I'll use it later... At last, I just want to say thank you.

franpa
26 Jul 2011, 18:51
Please re-word your question or elaborate on it.

matteobin
26 Jul 2011, 20:18
Please re-word your question or elaborate on it.

Yes please, what do you want to know exactly?

If you're talking about the game code, I don't think Team17 will give it to you.

But if you would like to know how much damages weapons inflict in Worms 2, click HERE (http://www.worms2.com/main.html?page=good&area=weap).

D_Wormkill
26 Jul 2011, 21:06
I think he wants to know how the collision gravity and physics are working in 2D Worms.

bonz
26 Jul 2011, 22:41
Join #worms on GameSurge.
http://worms2d.info/Worms_on_GameSurge

Look out for Deadcode and CyberShadow and ask away!
Those nice chaps have the source code for Worms Armageddon and know virtually everything about the ins and outs of the 2nd generation of Worms games (W2, WA, WWP).

You'll also find a lot of other knowledgeable people from the community who have intensively tinkered with Worms games and can tell you something.

Lex
27 Jul 2011, 10:09
The Worms 2 engine used for Worms Armageddon and Worms World Party is a pixel-based engine.

Every object in the game (grenade, worm, MB Bomb, oil barrel, mine, etc.) has a collision mask as defined by this image (http://lex.clansfx.co.uk/worms/masks.png), which can be found in the game's sprite directory (http://worms2d.info/Graphics_directory).

Collision occurs by each object checking if there would be a solid pixel inside its collision mask in the next frame of its motion vector.

When collision occurs, the object decides which event to perform (bounce, explode, slide, etc.) based on its state. If it's supposed to bounce, the object checks the angle of its current motion vector against the angle of the surface (which, in this case, can only be flat vertical or horizontal due to the nature of W2's pixel engine).

Walking and standing acts somewhat differently. Here's an explanation of that: http://worms2d.info/Worm_Walking.

Kyo
27 Jul 2011, 14:09
Join #worms on GameSurge.
http://worms2d.info/Worms_on_GameSurge

Look out for Deadcode and CyberShadow and ask away!
Those nice chaps have the source code for Worms Armageddon and know virtually everything about the ins and outs of the 2nd generation of Worms games (W2, WA, WWP).

You'll also find a lot of other knowledgeable people from the community who have intensively tinkered with Worms games and can tell you something.


The Worms 2 engine used for Worms Armageddon and Worms World Party is a pixel-based engine.

Every object in the game (grenade, worm, MB Bomb, oil barrel, mine, etc.) has a collision mask as defined by this image (http://lex.clansfx.co.uk/worms/masks.png), which can be found in the game's sprite directory (http://worms2d.info/Graphics_directory).

Collision occurs by each object checking if there would be a solid pixel inside its collision mask in the next frame of its motion vector.

When collision occurs, the object decides which event to perform (bounce, explode, slide, etc.) based on its state. If it's supposed to bounce, the object checks the angle of its current motion vector against the angle of the surface (which, in this case, can only be flat vertical or horizontal due to the nature of W2's pixel engine).

Walking and standing acts somewhat differently. Here's an explanation of that: http://worms2d.info/Worm_Walking.


Thank you for the answers...The masks, I think it's something like... photoshop does, right? My classmates and I had a discussion on the pixel-based system, though my teachers said that a pixel-based engine is too heavy to run.But now I know that they maybe just want things to be easy.Now I'll do something they never do. And also, I'll make full use of that directory to learn how to make my game. GameSurge...I think I'll use it later... At last, I just want to say thank you.

Plasma
28 Jul 2011, 16:28
My classmates and I had a discussion on the pixel-based system, though my teachers said that a pixel-based engine is too heavy to run.
Nah, that shouldn't be a problem at all unless your game has loads of objects moving at once. There's a few things you can try to increase optimisation, but I don't think it should be necessary.

What will be a problem, though, is making the ground disappear when shot. That tends to really slow down the game if you do it normally. If you're going to have that ability, you're going to need to be clever about it.
...that's if you are, I mean.