Hacker News new | ask | show | jobs
by dvt 22 days ago
"Same tick" is a misnomer for a few reasons. First of all, games use UDP, which is basically a "fire and forget" protocol (which means packets get dropped routinely). Second of all, realtime games use some interpolation/prediction to make up for latency (and aforementioned dropped packets).

So it's sort of a "relativistic" temporal system, not a linear "oh now you're at t=1, now you're at t=2" kind of timeline. And there's all kinds of complicated ways you create concensus between multiple clients, between server and clients, etc. (A lot of this remains an active research area.)

1 comments

Counter strike in fact uses ticks
A tick is the smallest amount of time the server does its "work" in. It does not mean, as the person I'm replying to was implying, that clients are 100% always lined up, because a game is played (locally) at much higher update rates.

So a server, of course, does send updates (player position, etc.) every "tick," but that doesn't matter. Even assuming zero dropped packets (suppose we're playing over TCP), it would feel like shit (stuttering, rubber-banding, pop-in, jittery physics, etc.) to play a game over a ~60ms latency that updates ~60 times a second vs other people that also are ~60ms from the server, so game engines do a lot of interpolation and servers are in charge of concensus. Hence, it's a bit of a misdirection to say: "can't you just send everyone the right player data every server update?" because servers obviously already do that (and that's not really the hard part, anyway).

Local interpolation and remote concensus is the hard part, and games handle this differently. In CS, for example, two players cannot kill each other (with guns) simultaneously. Valve's engine requires that someone always wins a gunfight (which sometimes can feel random). However, I would argue that feels way better than, e.g. in Halo, where you can headshot each other (and both players die), which feels dumb and frustrating.

So when building these servers, there are lot of tradeoffs to consider (a lot of which might change the feel of the game).

In the context of this fog of war thread when we're talking about pop in and peekers advantage. The relevant bit is to make the game fair for the both of them. For FOW its trivial to make the decision to reveal both players to each client during the same tick. Yes I'm aware of all the other knobs and gameplay possibilities. Ive got a shitload of hours and followed pro scenes for a long time, none of that matters to this fog of war anti cheat program.
> to reveal both players to each client during the same tick

And I explained why this is not feasible given modern network topology. Players move around maps and peek around corners in between these "tick updates" the client gets from the server; therefore, we have to use clever methods of interpolation and prediction as well as server consensus to ensure that gameplay is smooth (e.g. models can't just pop in out of nowhere, movement feels good) while also being as fair as possible (e.g. we don't favor one player's view over another's).

The fog of war does this by revealing early. Counter Strike devs decide the interpellation implementation and if it's balanced. As I said. The goal of the anti cheat program isn't to change the game balance