A (somewhat) novel approach to anti-exploits in Roblox
The problem
One of the great problems in Roblox development is exploitation. The best way to prevent this is through a well scripted server, but some of these exploits, like clipping, increased speed, and flying cannot be stopped by just verifying that your game logic is sound. In order to stop those exploits you need expensive checks on every single player .
For example, an anti-exploit for increased speed has to check the player’s velocity/displacement every several frames (on the server), making sure that it does not go past the allotted speed (taking latency into account makes this more complex but still follows the same idea). Although this works well for one player, as more players join its begins to lag. This method is not scalable .
A possible solution
The basis
A way to scale the anti-exploit checks is to use the client’s computing power. Before you yell about the client not being able to be trusted, hear me out. Although a single client cannot be trusted, the majority of clients playing on a server can. This is the basis of cryptocurrency (kind of) so it is not a new idea.
The details
The proposed idea is to have each client performing checks on random peer players. Every n seconds the client would switch which player it was checking. Together the clients are continually checking each other.
If the checks are not passed for a specific player, a client can send a “tip” to the server. The server would then exploit check the suspected player and either determine they were exploiting or find out the “tip” was a false positive.
The server would also throttle the amount of “tips” a client can send, to prevent against exploiters trying to lag the system.
Why it works
Even though this system uses the clients to perform anti-cheats, it is secure. The server always has the final say on whether a client is exploiting or not. Also, even if someone deletes the script that scans for exploiters on their client, there are still plenty of other players searching.
When/where it wouldn’t work
This method does not work and/or is more weak in servers with few players. It also only solves the problem of scaling anti-exploits. Writing the exploit checks is a whole other beast.
Flexibilities
A lot of the details of this system are up for variation. For example, one could make it so that the client spends a variable amount of resources scanning for cheaters (a phone would do much less than a PC for example). Other changes could be what anti-exploit script is running or the system for choosing which player the client will check.
Disclaimer
This is not the best way to detect all exploits. Most can be stopped with simple sanity checks and sound server logic. This system is specifically for running expensive anti-cheats on things that are replicated to all clients (player movement, kills a certain player has, etc).
Tl;dr
In Roblox (and online games in general) certain exploits like flying and increased speed are impossible to detect unless expensive checks are performed on the server. This is not scalable and causes lag as the number of players increase. Moving these checks to the clients en masse creates a trustworthy network that can tip off the server when a player is cheating. The server can then monitor and kick those players that could possibly be cheating, continuing to act as the assertive authority.
Thank you for reading. Hope you have a good holiday season.