collision detection

Started by
5 comments, last by alfre2 20 years, 8 months ago
Hello DEVs, I''m trying to design a fighting game but now I find my first problem, I want to know what COLLISION DETECTION method should I use in a game of this nature.
Advertisement
U definitely wouldnt need something as accurate as ray triangle.

Look into
sphere
circle
bounding box

They should suit your needs.

The only reason you will need ray triangle is if your terrain is not a flat ground as in virtua fighter(e.g the stage where you fight on a slanted roof/ stage where there are stairs).
Thanks a lot, if you want to share some resources or specifical material about it, plz do it.
it depends on eactly what type of fighting game your maing. If its something like the street fighter games (yes im old), then you might not need anything complicated at all. If you know the coordinates of where both players are standing, then you can probably almost hardcode the collision detection. For example if the fighters are 5 units away, and a kick can reach 6 units, but a punch can only reach 4, then a kick will hit and a punch wont.

I think you should make a fishing game instead
Thanks, AndreTheGiant

I''m asking you for help and ideas because I thought that in a site of people with so much experience like you I could get some contributions but please don''t try to figure out what I''m doing, TO ASK is easier.

PEOPLE PLZ, post me all the collision methods that you know.

and really thanks to you AndreTheGiant.
Oriented bouding boxes (OBB) or even axis aligned bounding boxes (AABB) might do the trick. Have one box for each main collideable areas in the characters, and you can store information on which ones are "defensive" and which ones are "ofensive", and whether they are active or not.

Example: the character''s hands and feet boxes are offensive, the head and torso are defensive. If the character attacks with a punch, the hand box becomes active. The enemy''s torso box is also active, and if they collide, the enemy takes damage and do the proper animation.

But if the enemy is defending, you could turn the torso box inactive, so it''ll take reduced damage.

Having the collision too complex and polygon-accurate would make the game a nightmare to balance.
Since you''d rather we not try to figure out what you''re doing, what are you doing? Namely, is your game 2-D or 3-D? The answers will be somewhat different for each.

-Auron

This topic is closed to new replies.

Advertisement