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.
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.