Competitive PvP Code Architecture?

Hello there!

I’m here to talk about serious code architecture in the most Competitive Multiplayer Fighting Games. We all know how bad Roblox’s exploit situation is, and I would like to get around it, if not through it.

Currently, I have a two state-machines, one on the client and one on server. The Client state-machine takes care of sending requests, applying physics, ui, vfx and pre-sanity checks for attacks before actually sending requests.

The server state-machine takes care of broadcasting an attack, sanity checking, enabling trails and effects, running hitbox calculcations and calculating lag as best as it can.

This system gives me full power over the actual pvp. The problem here is that replication of position is still vulnerable to exploits. A simple movespeed switch would destroy the competitive aspect. I could add calculated sanity checks for that too, but I’m looking for smarter, more intuitive ways to make this possible. Right now, the attacks are always done with the server’s permission and the hitbox calculations are on point.

What ideas do we have?

EDIT 1:
I have been following Chickynoids for a while now, and it just seems to have a very specific code shape which knit isn’t very friendly with.

1 Like

EDIT 2:
After some thought, I’ve figured that I could just send the entire input state to the server and do the sanity checks there. This would allow me to then send a ‘result state’ back to the client, and the client would then play the animation. This would allow me to remove the client’s state machine.
EDIT 3:
I’m going to take a look at Chickynoids and see if I can put some of its code structure in my game.

You should check out Chickynoid’s game on roblox. It has great physics and is a fighting game. You can find it on the front page when you search for fighting.