Okay this is really long so if you don’t feel like reading an essay there’s a TLDR at the bottom
I’ve got a few questions about designing the system behind the actual shooting part of a first person shooter.
- What exactly is a hacker capable of?
As someone who’s never cheated in a Roblox game before, I don’t really know the capabilities of a cheater, can they fire my remoteEvents? can they access data about things outside of their character? Presumably they can’t just rewrite local scripts… I hope.
I find it quite hard to devise a solution for a shooting system that is relatively “Cheat proof” without knowing exactly what cheaters can do.
- What is the standard method for communicating information about a shot between client and server without allowing hackers to run rampant with it?
I’m making a lot of assumptions to come to this conclusion, but I’m guessing that the less information a client sends to a server, the better, because it gives the hacker less control of how the shot is handled server side.
That being said, the least information I can imagine sending to the server is simply a look direction, and then the server can raycast that way based on the head position and make decisions. This is where lag comes into play, because if the player you shoot moves behind cover before the server has received the shot, there is no way for the server to know that shot was “supposed” to hit based on the positions of every object at the time of the shot.
I have theorized a solution to this where the server remembers where everything is every frame and saves a “short term memory” and decides if the shot would have hit at that time, but this sounds incredibly resource intensive, and also hard to pull off without simplifying hitboxes to an unrealistic degree.
I’m wondering if there’s an easier solution that what I said above, or if the actual answer is that people just suck it up and expect lag to cause issues like this.
I might be really overthinking this ![]()
TLDR;
I’d like to know how much power a hacker has over how the game runs (what exactly are their capabilities and limitations)
I’d like to know what information you’d put in the remote event to tell the server you fired a shot (in an FPS context)