(Replying to PARENT post)

I used this guide when implementing my own real-time multiplayer platforming game.

It really understates the importance of authority. It blows my mind how many games, especially FPSes, give a lot of authority to the client. Lag compensation for shooting is one thing, but clients should not be able to shoot through walls or speed hack. These types of cheats are easy to prevent server-side, but developers don't because .... ? No idea. I've always guessed that it's to reduce server-side CPU load, but that's all I can guess.

πŸ‘€Sohcahtoa82πŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

I believe part of the problem is that it is hard enough to build a game in the first place, and networking is a deep skill within itself.

I've been doing large scale distributed systems for a decade, and I still feel like I'm learning especially as I retool for games.

The way that I'm trying to make this simple is by inventing a new platform for "serverless game hosting" using my programming language (Adama : http://www.adama-lang.org/ ).

My focus on board game is the ultimate in server's role on authority since board games are more transactional between players and staggered (I play this card, that card enables another play to react, that reaction enables another play to augment, etc).

I'm looking into what it could mean to escape the board-game pit, and one thing that I'm thinking about is latency. The question that I'm looking at is whether or not I can have a programming model be differentiated such that the client prediction code can be generated.

A trivial way to exploit my language is to bring edge computing into the mix such that the edge compute runs a copy of the entire game, and then ships deltas quickly which will be overwritten from the authoritative server. This will work on updates to existing data (i.e. moving position), but it will fail at creating new items unless I move unique id generate to clients (which, is less than happy for me).

πŸ‘€mathgladiatorπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

Maybe if you just have a flat world where you move in any direction with a max speed, but this sort of anti-cheat becomes incredibly difficult once you add features like terrain, physics, vehicles, things like gliders (in BR games), speed boosts, etc. It's possible, but takes a lot more effort.

For example, in Fortnite, if you toggle a lagswitch (as in, block Fortnite UDP for some time), then reconnecting to the server will return you to the same position you were at when you disconnected, assuming you were just trying to run on the ground. However, if you toggle a lagswitch in a vehicle, the servers don't want to do expensive, complicated physics server-sided, so your client becomes authoritative to your position and the sanity checks are simply making sure you're not teleporting around large chunks of the map in seconds. If you were to hack your client and give your vehicle moon gravity, the server generally wouldn't care about that.

πŸ‘€judge2020πŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

Hell, I can forgive it in games -- it seems pretty easy to forget a detail that can accidentally give too much authority to a user in that space, especially when you're trying to crunch your frame time.

What really surprises me is how how often I see this mistake in web development. "No, Bob, you should not increase the user's bank account based on that number passed in from the frontend React app."

πŸ‘€skipantsπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

I believe it's because there are 2 conflicting goals:

1. Authoritative server 2. Client accuracy

By 'client accuracy' I mean that was happens on the client actually occured. Ie. If you shoot a player, he actually got shot.

The conundrum is that these goals conflict. They are like Heisenberg uncertainty: you can have position or momentum, but not both. You can have server-side authority, or you can have client side accuracy, or somewhere in the middle.

Just as an example, most shooters have the goal that 'if you shot him on your screen, it was a hit', even if according to server side knowledge the recipient of the shot had already moved. Otherwise when you're shooting you would have to guess where the player is going to be when you're bullet packets reach the server.

So instead, we let the client decide what a hit was. Hopefully the server has some sanity checking.

I shoot at time t, server receives the info at t+s, reporting that I shot at some trajectory at time t.

But the client can erroneously edit history. What if the client sends t-0.1s instead of t? There is no check the server can do to prevent this... I appear like a client which has 150ms of latency even though I really only have 50.

πŸ‘€GunaxπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

> should not be able to shoot through walls or speed hack. These types of cheats are easy to prevent server-side, but developers don't because ....

"easy" so you think veterant c++ dev that invented those concepts are dumb or lazy and it's a solved problem?

It's not easy and not solved because those are very complicated issues.

πŸ‘€ThaxllπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

It was a big thing in World of Warcraft in particular because the internet was so unreliable when Wow release that they wanted the player to be able to do things when all your packets dropped for a few seconds (well maybe a whole minute)

But they didn't really compensate for exploiting this to do things that were actually impossible. (ie speed hacks)

πŸ‘€trissylegsπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

πŸ‘€thejoshπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

One important reason is that P2P games that only require central services for matchmaking but not for the actual gameplay sessions are a lot easier and cheaper to scale to high player counts.
πŸ‘€flohofwoeπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

Latency and performance, if you have to wait for the server every time you move or fire. It's a tradeoff which things are client and which are server.
πŸ‘€mysterydipπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

I suspect that a lot of that is for the sake of client side prediction: if an enemy runs out from behind a wall, you want as little delay as possible between it happening and the player seeing it in order to react. Cheaters love it, but it does help with the illusion that everyone is playing in the same game world in real-time with no delays
πŸ‘€Rd6n6πŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

there are fun types of gameplay that can’t happen without client authority. you can make an aimbot either way so it isn’t a huge deal. like you i had a hard time accepting that pubg using client aide hit detection maee any sense, but after playing it a lot and thinking hard about it I changed my mind. That game is all about pixel perfect aiming. Lag compensation wouldn’t cut it.
πŸ‘€gameswithgoπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

From my recollection, the primary issue is, or at least was, consoles. Sony and Microsoft required the games to allow players to have ridiculously high pings (several hundred ms).

If you play a first-person shooter with 300-400 ms ping and the game uses server side hit detection, you're not going to have much fun.

By moving to client-side detection, players hit what they "should hit" from their perspective.

At least that's how I recall it from when COD and BF moved to client-side hit detection.

πŸ‘€magicalhippoπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

these checks would result in a more expensive cloud billing. it's cheaper to keep the server just as a message relay between clients
πŸ‘€frozenlettuceπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0