I want to make a PROPER combat system, but what's the best approach?

Hello, recently I’ve taken it upon myself to make a real nice combat system for a game I have in mind. It’s basically finished, but there is one problem. It feels unresponsive, and the effects aren’t really top notch. It definitely take’s skill, but it’s not the type of combat system I want. What I want is snappy, fast paced combat, that has subtle but noticeable effects. I’ll go over the questions I have for how to do these in this post.

When making snappy, fast paced, combat people will always say playing animations and utilizing debounces on the client is key. However, as many of you know this makes scripts vulnerable to debounce exploits. An exploiter might be able to fire animations a normal player certainly wouldn’t be able to do. So I guess the question comes down to, should I do the animations and debounces on the client, or keep it on the server(where it is currently.)

Next, what would be the best way to detect if a player is currently punching, blocking, etc? Normally, I’d just use values or something along those lines but I’d like to explore new options. Maybe something like a table that updates on the server everytime a player performs a specific action? I think it might be faster than iterating through a table of value to check if they’re true or not, and it might be able to update faster. Maybe check if it’s the actual animation that’s playing?

Another thing I truly struggle with is effects, my combat effects look so poor(mainly because I’m only able to test on a low-end pc.) Any tips in this regard? Maybe video links of certain effects that show up when a player attacks, blocks, counters, etc.

Finally, I’d like to go over a thing I like to call “player-counter-chances.” Where a player has a chance to either dodge, block, or attack out of a combo. What would be the best way to implement these? Make certain combos more slower than others? Or decreasing stun-times?

I’m welcome to any more info/tips, thanks for reading my post!

5 Likes

If it’s a single player experience, you shouldn’t worry about this too much. If you’re adding PvP (Or is a PvP centered game), you should wait for other anwsers.

You can always replace components in your pc with better ones. If you can’t, try to work within your limits. As for effects, that’s not really my thing. Once again you should wait for other anwsers.

This definitely reminds me of the Mario And Luigi Series which has a mechcanic similar to this one where you can dodge and counter enemy moves by jumping and hammering, which applies to bosses as well. I only played the first one, so I can’t provide too much info on this outside of what’s in the first one. If you want more information you could look it up.

And I forgot to ask when I wrote this post, is this turned based?

Actually, I want my game to utilize a very-faced paced dark-souls esque combat. Maybe Devil May Cry? What I do know is the components I want in my combat, which may seem like a hybrid of various combat styles to some. Regardless, this is what I want:

Staggering/Stun - I want people to FEEL themselves getting hit.

Combos - This is where I want the fast-paced aspect of the game to come from, I want every move to feel like you have a chance of escaping, however, trying to do so will be very risky. Which brings me to my next point.

High Risk-High Reward: Trying to dodge/parry/block out of a combo will feel amazing and will grant the player tons of opportunities to either strike back or escape. However, fail and this will be detrimental.

Skillful Gameplay: I want players to see the actual DIFFERENCE between a player who has memorized a specific classes combos, versus a player who just started playing the game a week ago.

EDIT: I should also mention that this will most definitely be a multiplayer game with PvP being a heavy aspect of it.

1 Like

Try using

Example Code
` local blocking = false
  local damage = 10
  for i, anims in pairs(humanoid:GetPlayingAnimationTracks()) do
      if anims.Name == "Block" then
            blocking = true
      end
 end
 if blocking == true then
     print("Do something like:")
     damage -= 5
 end`

Kind of late but I would like to add that you can completely avoid debounce exploits by hosting debounces on server side, to accomplish this you would create a dictionary of players that get registered once they join the game and assign a certain debounce value. What this does is it creates this circumstance where firing many remote events doesn’t matter, moreover just an idiotic move from a exploiter if he does. I have implemented debounce in my combat mechanic test place, where i have got this working. Another thing you may want to look at is procedural animations, these are animations that done with CFrame maths with the Tween Service, to put it simply You can make your animations seem more seemless with some mathematical animations.

To answer another question you had about the best way to detect if a player is punching is by just setting a keybind locally and firing a remote event to check debounce etc on server side.

I would also like to add that by using procedural animations you can pause or stop an animation so you can make a stun animation as soon as the player gets hit and stop the animation. This also gives you more performance benefits.

4 Likes

Hey from my idea of that “exploit” problem you are having right now or so theres actually a way to that my idea is a bit complicated or not really a clean one to do so but its just my idea alright so basically everytime a player spawns you gotta add a folder about combat relations and then add some intvalue which is the debounce cooldown of your combat so if the player fires the remote and the intvalue of the debounce cooldown is not <= 0 then its gonna be detected just add a bit of -1 for the intvalue to be sure to be working hope it helps :D.

2 Likes