How do you keep gun fire delay minimal?

What if the user moved out of the “sight” as soon as they were shot?? It would be exactly the same.
What you’re suggesting here is that “Because it’s too much work we shouldn’t do it”
Correct me if I’m wrong…

1 Like

In comparison to server-side detection, that would be a lot more desirable in my opinion. I’d rather be shot with the appearance of being behind cover than missing 90% of my shots that have obviously hit the target.

2 Likes

We still do hit detection on the client but do verification on the server.

We do not do it well, but IMO this is how it should be done, and in future games I will do it better.

10 Likes

Then make sure they’re not shooting through walls too often :slight_smile:

Checking that a player isn’t executing suspicious behavior too often isn’t any different in principle to what anti-exploit systems do to detect players that are flying or clipping through walls.

  • In the case of flying, you don’t punish the player the first time they stay in midair for x seconds since they could have been flung (roblox physics, amirite) or they could have been jumping from the top of the building. (This gets a bit complicated if your game has mechanics that enables players to actually fly, such as jetpacks or wings.)
  • For no-clipping, if your method is to raycast between the player’s previous position and current position at a regular interval to detect instances of the player walking through walls, then instances of the player turning a corner too quickly (or a well-timed lag spike) will trigger this. The solution here is to check that the player isn’t clipping through walls too often.

I think you’re underestimating just how infeasible it is to implement the system that I linked in Roblox (if read it at all, you’d understand exactly how hard it would be to implement it in Roblox). I supposed I should have emphasized it more when I said it takes a lot of work. It isn’t as simple as just doing raycasts on the server, which is what people in this thread are suggesting. Here’s how they do good hit detection for hitscan weapons:

Or, in simpler Roblox terms (assume that player characters are just one part):

1.1 is easy. There are a few modules out there that use remotes to get a player’s latency. 1.2 and 1.3 on the other hand requires you to…

  • keep a history of every character’s CFrame, and
  • rewind each character on the server (or at least those “close” to the path of the bullet) to account for latency.

Now you might think that keeping a history of every character is easy, but since clients have authority over their CFrame in Roblox, you’re going to encounter the issue of poor connections making players “teleport” from the server’s perspective. This will mess with your hit detection (n.b. in the article I linked, their server model has authority over player’s positions since all the client can do is send inputs, so this isn’t much of a problem.) This won’t work in Roblox at all unless you’re script your own server-authoritative model, which is it’s own can of worms.

5 Likes

Any gun on roblox is easily exploitable(Even a complex game like Phantom Forces) because all the player positions update client sided and there is no limit on where you can aim your gun. Exploiters will go on either way as there are many free level 7 exploit software’s.

Best chance you have against exploiters on any shooter game is to have in game admin to find anyone who is using aim bot. If you want experience + security I would add a server script that checks the amount of kills you get in a certain amount of time and if it too inhuman like(3 kills in less then 0.5 of a second) then kick him/her from the game.

Where did you get that notion? No limit to where you can aim your gun? If someone shoots someone else through a wall or goes over the range limit of the weapon then it’s obvious exploiting, no limit implies that users can just shoot from wherever using exploits

1 Like

Yes, Obviously but most games let you wall bang. I’m talking about aim cheaters. They don’t have to kill anyone through the wall they can just use aim bot and kill everyone no matter what and if you make a limit to how far your bullets can go then it would not be a problem. Aim bot and Walls are a bigger problem you should worry about.

That is an issue, but I believe that if you look at the exact center position of another players head for a full 60 frames then you could detect aimbot hacking that way

Shooting through a bunch of walls will not be that big of a deal if you add a limit too it.

Well the limit for the gun’s range is mainly there so that the gun doesn’t continue raycasting after it doesn’t have to, so like, bullet travels > 500 studs, stop this bullet, etc

Phantom Forces moved to server side a few months ago. We rarely receive complaints about hit detection anymore either - I’ve probably heard 1 complaint about it in the last two months. Hit detection issues only happen for people with bad lag - so if you’re shooting someone and it doesnt register as hit, they are NOT actually where YOU see them on their end. Serverside hit detection generally are worse for people with horrible lag and better for literally everyone else.

3 Likes

You probably misunderstood, if you read my above replies I said that I achieved a gun system on server that would make up for latency and damage latency and it’ll only miss when the other player has horrible lag.
No it’s not as hard as you’re making it sound it is quite simple you just have to know what you’re doing, handling something on the client when it should be handled on the server sounds like a really bad idea to mw, but you do you.

Its not the amount of exploiters, its the exploit. All it takes is one exploiter who takes advantage of every little insecurity in the game and uses it to spam kill everyone. Which will cause negative gameplay for every use either way?

I’m also pretty sure that most, if not all of the successful shooters on the front page use client-side hit detection.

This just can’t be true. Exploits in shooter games have noticeability decreased the recent years, devs are getting better and smarter and I doubt these old methods are still used.

And keep in mind, all it takes is one smart person to make that exploit and once they spread it around anyone with no knowledge of exploits what so ever can utilize that insecurity in the game and then the game will be in a lot of trouble.

Also, 2015 is 4 years ago near when Phantom Forces were still near its beta stage and back then the exploits in that game were brutal. They leave scars in my childhood. (lol jk)

2 Likes

Once again, I did not mean client should fully determine hit detection. I’m saying that the client should be the one to call the hit so that the server can do a sanity check on whether or not the hit was valid.

As quoted by AxisAngle:

by server side you mean client raycasts and detects what was hit, then the server runs sanity checks and deals damage, right?

Hit detection on the client? Horrible Idea. Exploiters will EASY abuse this.

Here’s basically a summary of the thread:

Hit detection should take place on the client to ensure good UX. Then, the server should independently verify the hit, and deal damage accordingly.

This way, the user experiences no latency (even though there is a little bit) and the client can’t abuse because it’s not the one allowed to deal damage. The client, should they abuse as such, will only see a bunch of hit markers.

5 Likes

In regaurds to recording player movement to “rewind” to the timestamp when the gunshot was fired, should I record the cframes of every body part, or just the humanoidRootPart and then use the magnitude for where the shot hit - the rootpart’s position to see if the shot was valid