How do you keep gun fire delay minimal?

You forget that the “easily solved by joining a different server” solution doesn’t apply if there is a mass amount of exploiters in the game. Take Counter Blox as an example, they have client sided hit detection. You are able to mass kill, hit through walls and whatnot. You can votekick them or switch to a new server but not long after that a new exploiter will join the fray. (Counter Blox doesn’t bar you from the server you got kicked from unlike Phantom Forces (iirc)).

2 Likes

Would you play a competitive shooter that uses Murder Mystery 2 guns just because they are 100% secured?

If I recall, I never had any hit detection problems during any of the times that I have played Murder Mystery 2.

3 Likes

You are one of the very lucky sheriffs and I envy you for that. Murder mystery 2’s hit detection usually isn’t accurate at all, but it gets a pass since it’s not meant to be a competitive shooter.

Since this is starting to get off topic, let’s go back to the OP’s original question. This section of the forum isn’t meant for arguing.

Client-side handling is the best method for the OP’s question regardless of whether you decide to use client or server side hit detection.

Yes, handling visuals should be on the client while handling hit detection and such should be on the server for the most secure and user-friendly gun system

Not handling hit detection on the server is like saying
“hey exploiters free game to cheat on xDexD”
There are many ways to deal with latency and “bad hitboxes” I actually made a project of my own and was able to accomplish all of those things. It’s possible but you have to know what you’re doing :woman_shrugging:

The way i have it set up, hit detection will for the most part be handled by the server, i think im going to go with recording 5 seconds of movement (not from every step of course) and kind of “rewind” to the timestamp from when the shot was fired, and then send the raycast from where the gun’s barrel was (and with bullet calculation of course, such as bullet drop) to see if the shot was actually possible, if so it will inflict the proper damage, i really appreciate all of you helping me and i have a much better understanding of this now!

If online sources are to be trusted, the hit detection for Battlefield 4 (and I’m assuming more games in that series), COD, Splatoon 1/2, and PUBG implement bullet hit detection client-side. Even Roblox games such as Attrition, Phantom Forces, and Q-CLASH handle hit detection client-side.

I know of a few games, such as TF2 and CS:GO, which do hit detection server-side, but implementing it in a way that doesn’t ruin gameplay takes a lot of work.

I would recommend just detecting hits locally, and doing checks server-side (e.g. make sure there’s a direct line-of-sight between the shooter and the point of impact, make sure the player isn’t dumping their entire magazine in one burst, etc.)

8 Likes

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