(Help needed) First person shooters: Shooting, Cheating, and Lag

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.

  1. 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.

  1. 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 :confused:

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)

Exploiters is capable of:
Changing instances (this count local-script also, they could also change or even get your server-side script’s code on remote-event, depends).
(This changes on their local, not server if not remote-event, depends)

Change part’s position if they own this part in NetworkOwnerShip or even able delete it

Getting your game (not full of it, since they just get what is replicated)

And as well alot.

Major of is remote-event
they can run code or sending false information on remote-event, so you need protection against it

Yeah this is what I was worried about.

presumably then I have to give the client as little power as possible to tell the server what to do on each shot.

1 Like

You should handle almost everything on the server. The best way I know is to honestly just send over the mouse position via a remote event and handle the rest on the server.

  • Checking between the player and target if there’s obstacles
  • Having an actual bullet shot
  • Debounce (time between each sent event)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.