Hey, and thanks for reading in advance.
I’m getting the framework ready for a 2D fighting game I plan to devote more time to in the future (it’ll be easier to work on if the basics are already there). I know games like this are rare on the platform, but I decided to try my hand at one anyway. That said, there are a couple code-design issues I want to iron out before I start doing anything substantial.
-
These games need to be extremely responsive - this means the server involvement is minimal at best. When a player connects an attack, the other player has to be stunned and incapable of moving for a finite amount of frames. Should I have the client manage the states of the other player (I.E. forcibly playing hitstun animations and immobilizing them) and simply have the other client repeat the same procedures on itself? Should I have the server tell the other player to enter a stunned state?
-
I don’t typically have trouble with hit detection, but in many 2D fighters under the hood, each character has predefined areas on their body (hurtboxes, hurtcircles) that control where they can legally connect with an attack. These areas can often be moved, disabled, resized, or removed outright depending on the current state of each player. Could I even replicate this behavior without the server being a bottleneck?
-
I know any design for a game like this would mandate extremely poor server-side security for the sake of performance, but is there any way to soften the blow from the inevitable wave of cheating in a game like this?