I need some tips on a combat system

Hello!

I’m going to be making a combat system with combos like a Dragon Ball type fighting game. I just want to know a few things before I begin making it.

  1. What is the best method for hitbox detection?

I’ve used .Touched before, was really inconsistent. I’ve used magnitude and raycasting together, it worked fairly well except some times the hits wouldn’t connect. And of course, Region3. Although I’m not too familiar with Region3.

  1. Any no-no’s with a combat system?

Like something that should never be used in a combat system due to performance errors or something like that.

  1. Extra tips.

Anything

4 Likes

What I usually use for melee weapons is raycasting

1 Like

If you are gonna make combat games you should also watch out for exploits. If you want your game to be safe add more time into anti exploit script it will help you a lot.

The biggest concern with any fighting game is exploits and combat logging.
Competitive games tend to attract exploiters and people who will abuse glitches for any sort of advantage.

Combat logging is also an issue. Players will leave games to either escape a fight they can’t win, or in order to reposition for an advantage.

I would use magnitude, no need for raycasting. Just make sure to do the hitboxes on the client if you want them to be accurate, though, you probably don’t have to do this if your combat isn’t fast paced.

As for exploits, I think you’re good as long as you do sanity checks on the server. So when the client claims it hit the target, make sure you verify it on the server before you deal any damage or anything. Also make sure to have some degree of error since ping exists.

As for other tips, just keep tweaking until it’s perfect. Don’t know what else to tell you but your combat will not be perfect the first round through. Maybe look at the combat systems for other games to see what people like.

4 Likes

Magnitude works but I don’t find or think it’s ideal for most attacks, because most attacks are supposed to be aimed IN FRONT of you

If you only used magnitude, you could hit anyone in any direction as long as you’re in the range. Like imagine punching, and then hitting someone you aren’t even facing/looking at, it’s weird. I used magnitude and ran into that problem so I changed to raycasting

So yeah, if you’re going to use magnitude you should pair with raycasting or find a way to track attacks facing in only one direction

Ideally you’d check the target’s distance and check if they’re in front of you which can be done with raycasting I suppose but I would personally use the dot product to just check if they’re a certain angle in front of you.

Oh yeah, that’d work as well too

I am pretty late but I suggest you use a module that was made by @TeamSwordphin its very useful I use it to this day and pretty easy to understand, the module uses raycasting.

more info:

1 Like