Can I get some feedback on my combat system?

I’m trying to make a combat system similar to Sekiro, so players can deflect attacks by blocking right as the attack lands, as well as dodge attacks and block them.

This is my plan so far:

  1. Player clicks to attack
  2. A remote function is sent from the client to the server, verifying it is possible
    to attack
  3. Server checks the players stamina and whether or not their current state makes it
    possible to attack (falling, dead, already attacking, etc)
  4. Client gets the go-ahead, plays animations, begins raycasting at a defined
    keyframemarker in the animation, stops raycasting at another keyframemarker
  5. If ray hits something, check if it’s a character and check if it is possible to hit
    it in it’s current state. Send remote function to the server verifying that
    the attack could realistically hit
  6. Server checks distance between players, if the distance is larger than the weapon’s
    defined range, deny the attack
  7. If the attack hits according to the server, check the condition of the hit player.
    Do logic checks to check if the hit player is blocking, deflecting, or dodging
  8. Depending on the result, send a graphic event to all players within a certain range
    to render particle effects and sounds.
  9. Update player values accordingly

Is this an efficient way to do this, or is there some service or something that could make this better?

1 Like

Wrong Category, but it’s pretty normal and should be good. You could put in custom attack animations if you want to make it a great experience.