Archived

This topic is now archived and is closed to further replies.

alfre2

collision detection

Recommended Posts

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

Share this post


Link to post
Share on other sites
GamerSg    378
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).

Share this post


Link to post
Share on other sites
AndreTheGiant    329
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

Share this post


Link to post
Share on other sites
alfre2    122
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.

Share this post


Link to post
Share on other sites
M3d10n    170
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.

Share this post


Link to post
Share on other sites
Auron    328
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

Share this post


Link to post
Share on other sites