News for hackers. Stuff that matters.
Re:Riot Games: Artificial Latency for Remote Competitors by vikingerik on Tuesday May 17, 2022 @03:18PM (#31415188)
You can in fact have that magical time-travel approach to get apparent latency lower than the real number. Keep a history of the game state at every tick, so you can roll back to any previous instant. If real latency from one client is 50 ms, and you're targeting 35 ms, you roll back the game state by 15 ms each time input comes in from that client, and re-run the game logic from that point forwards and send the resulting state update to all clients. Those clients will see a bit of jumpiness in the game state, which isn't ideal, but may be the lesser evil compared to enduring more latency.

(I have no idea what LoL in particular supports or implements, but that's the general idea.)

Re:Riot Games: Artificial Latency for Remote Competitors by jchw on Tuesday May 17, 2022 @03:48PM (#31415514)
This strategy is commonly referred to as being in the class of “latency hiding” as it doesn’t actually improve latency, it just allows you to reduce apparent latency. In practice it’s still useful but I think it’s mainly useful because it allows for local input to be buffered significantly less than if you were to compensate for lag by adding buffering only. However, that is not always useful. It is mainly useful in games where netplay is handled in a lock-step fashion, where each peer needs to keep every action coherent frame-wise. That makes sense for things like fighting games, but it doesn’t make all that much for say, puzzle games, even though those can be quite latency sensitive too.

Either way, there is nothing magic. At the end of the day, the soonest you can see an action is still physically unchanged. Especially since the prediction model that makes the most sense is just assuming no action.

That said, I dunno enough about MOBAs to try and postulate on how much it matters, and I have no idea if LoL is using lockstep or some other approach.

Re:Riot Games: Artificial Latency for Remote Competitors by skocznymroczny on Tuesday May 17, 2022 @04:05PM (#31415671)
LoL is not using lockstep. Lockstep has two big disadvantages for a competitive game. Tt requires both client to have the full game state to run the simulation, which makes creation of maphacks trivial. The second issue with lockstep is that if one player is lagging, all players are lagging, which is also not something you'd like to have in a fast paced competitive game.
Re:Riot Games: Artificial Latency for Remote Competitors by causality0 on Wednesday May 18, 2022 @12:51AM (#31419335)
Maybe I'm just a fuddy-duddy, but for me there's no room for remote competitors in a serious competition. Either it all happens on the same LAN or its just playing for funsies.
Re:Riot Games: Artificial Latency for Remote Competitors by russellendicott on Wednesday May 18, 2022 @06:42AM (#31421134)
I know right, what about home court advantage or any slight imbalance that great 70's movies are made of?
Re:Riot Games: Artificial Latency for Remote Competitors by reitzensteinm on Tuesday May 17, 2022 @05:38PM (#31416586)
What to do when one player is lagging is a design choice. You can instead keep the game going and feed in their delayed inputs.
Re:Riot Games: Artificial Latency for Remote Competitors by grog454 on Tuesday May 17, 2022 @11:12PM (#31418862)
> Tt requires both client to have the full game state to run the simulation,

> The second issue with lockstep is that if one player is lagging, all players are lagging

Where are you getting this?

My game Nebulous uses lockstep, and it's a MMOish mobile multiplayer game. Plenty of clients lag, but one client lagging doesn't cause any other to lag. Furthermore, clients do not have full game state, as an optimization and data transfer reduction first, anti-cheat second.

Path of Exile actually lets you choose lockstep or client-predictive. "Serious" and "competitive" ladder players choose lockstep because, naturally, you want your client's representation of the game state to be as close to the server's representation of the game state as possible, UX be damned.

https://pathofexile.fandom.com/wiki/Networking_mode

Re:Riot Games: Artificial Latency for Remote Competitors by tylerhou on Tuesday May 17, 2022 @11:37PM (#31418997)
I’m guessing that even SC2 uses lockstep, as (in some cases) I’ve seen one person lag because their opponent has a spotty connection.
Re:Riot Games: Artificial Latency for Remote Competitors by grog454 on Wednesday May 18, 2022 @12:09AM (#31419143)
This is independent of lockstep vs. predictive and more to do with topology. SC2 (and most RTSs) are peer to peer, there is no server game state, just two clients that synchronize to each other. In that case, one client lagging will absolutely effect another. Also in that case, its incredibly difficult to not have both clients simulating full game state.

Prediction could mitigate that (and possibly does, even in sc2), but if one client is suspended and the other is running fine, either every thing that the running client does is moot (and will be reverted) or it gets suspended, regardless of lockstep or prediction.

Re:Riot Games: Artificial Latency for Remote Competitors by tylerhou on Wednesday May 18, 2022 @03:48AM (#31420250)
Source on SC2 being peer to peer? I see it's server-client based. https://tl.net/forum/starcraft-2/145084-starcraft-2-netcodin...
Re:Riot Games: Artificial Latency for Remote Competitors by grog454 on Wednesday May 18, 2022 @09:10AM (#31422321)
The thread you linked reasonably concludes its "routed" P2P. In other words, P2P with, (1) a forced route through, and (2) a form of network address translation at, blizzard's server.

My speculation: this almost exclusively to protect the private IP of one client being exposed to another client. There is no server processing happening beyond connection verification to help mitigate desync attacks. Deliberate desyncs are still possible though, since I've been the victim of it.

Re:Riot Games: Artificial Latency for Remote Competitors by bee_rider on Tuesday May 17, 2022 @06:28PM (#31417020)
I can definitely see why the maphack thing would be an issue generally, but in the case of a broadcast esports competition is it so significant? They seem to have put an awful lot of engineering effort into their special lag system for this tournament, so I assume they at least have some pretty decent budget. So, presumably they could create a special client (possibly even sending the competitors locked down hardware). This seems like it would let them do some things we'd normally consider impossible or 'magic' -- assume both sides of the pipes are going to tell you the truth about everything...
Re:Riot Games: Artificial Latency for Remote Competitors by jimmydorry on Tuesday May 17, 2022 @06:46PM (#31417158)
There are pretty regular esports scandals involving cheating. Heck, we've seen players bring their cheats in via special drivers embedded in their peripherals (which is why almost every serious in-person tournament provides peripherals + PC and does not allow the player access to them outside of supervision).
Re:Riot Games: Artificial Latency for Remote Competitors by __turbobrew__ on Tuesday May 17, 2022 @06:44PM (#31417144)
I really dislike games which rewind state based upon latency. It penalizes people with good ping and can lead to very weird game states where a large rollback can cause teleportation of a laggy player as seen by non laggy players.

Team Fortress 2 is particularly bad where high latency players can teleport around or you can shoot and hit a laggy player but it doesn’t register by the server due to a rollback. Some players purposely exploit this function by artificially increasing their ping values to absurd levels (700ms or more) which makes them very hard to hit. Many community TF2 servers enforce maximum ping limits for this reason.

Most notably high pings are used to exploit when playing as the Spy class due to the fundamental purpose of the class is to get behind you to backstab you. If you have 700 ping can abuse the fact that you you can get behind players due to the game being out of sync and if you can backstab a player the server will roll back and kill the non-laggy player even though you were no where near behind them from their non-laggy perspective.

Re:Riot Games: Artificial Latency for Remote Competitors by ben-schaaf on Tuesday May 17, 2022 @08:51PM (#31418016)
While the exact logic TF2 uses leaves a lot to be improved, you absolutely need this kind of lag compensation. Without rewinding any amount of latency results in having to aim where an enemy gamer will be by the time your packet reaches the server instead of where they are on your screen. If you remember before they patched the Pyro class you had to aim significantly in front of players because the flames weren't lag-compentated.
Re:Riot Games: Artificial Latency for Remote Competitors by amluto on Thursday May 19, 2022 @12:29AM (#31430782)
I rather enjoyed playing Q2 on a modem and aiming the railgun where someone would be in 150ms. It took practice :)
Re:Riot Games: Artificial Latency for Remote Competitors by camgunz on Tuesday May 17, 2022 @07:46PM (#31417562)
There's a difference between backwards reconciliation (rolling the game world back to process a lagged player's input) leading to "shot around a wall", and packet loss/jitter leading to jumpy player and teleporting.

I make this distinction because I actually think backwards reconciliation is table stakes for any kind of precision game and is usually pretty easy to implement. It can also help solve teleporting: you run backwards reconciliation on movement commands also (not just shooting or other actions), and combine with a little player position extrapolation.

Nothing fixes a 700ms, actually I would guess the ceiling on competitive play is somewhere around 200ms with incredible netcode. But 200ms gets you pretty far: across the US or the Atlantic Ocean for sure (packet loss over those distances is another story though).

Re:Riot Games: Artificial Latency for Remote Competitors by SeriouslyChad on Tuesday May 17, 2022 @10:38PM (#31418683)
every game in existence where you can shoot at someone by simply clicking where they are either uses lag compensation or clientside hitreg, it's simply impossible to get around this

also players only teleport around on your screen in tf2 if you set your cl_interp very low

Re:Riot Games: Artificial Latency for Remote Competitors by __turbobrew__ on Wednesday May 18, 2022 @01:08AM (#31419426)
I’m not a game dev but I don’t really buy that being able to shoot other players requires compensation or client side hit reg. If you assume players have 35 ping (as Riot did) that is only 2 frames at 60fps which may make a small difference in edge cases, but I believe the game would still be very playable.
Re:Riot Games: Artificial Latency for Remote Competitors by Matheus28 on Wednesday May 18, 2022 @02:27PM (#31426041)
Spoiler alert: it wouldn’t be “very playable”. Not in a FPS. There’s a reason that basically every single FPS out there has it. You want headshots to happen when people click on people’s heads, not clicking ahead of them.
Re:Riot Games: Artificial Latency for Remote Competitors by __turbobrew__ on Wednesday May 18, 2022 @03:06PM (#31426433)
I stated a detailed reason why I think playing a game with 35 ping without rollback would be “playable”. If you would like to explain technically why it would not be playable I am willing to listen and learn, but posting some low effort Reddit-esque reply does not bring any value to this conversation.
Re:Riot Games: Artificial Latency for Remote Competitors by SeriouslyChad on Wednesday May 18, 2022 @09:24PM (#31429635)
no, it would not be playable, even with 35 ping
Re:Riot Games: Artificial Latency for Remote Competitors by meinersbur on Tuesday May 17, 2022 @03:39PM (#31415405)
That's just another kind of latency. Additional time has still passed from you (or the enemy player) doing an action, and you seeing the results of that action on your screen.

By contrast, the server rolling back the game state is indistinguishable from the server always being 15ms behind and the clients running the simulation ahead of time (which they do anyway for fluency [1]). The "jumpiness" is called rubberbanding [2].

[1] https://www.gabrielgambetta.com/client-side-prediction-serve...

[2] https://www.urbandictionary.com/define.php?term=rubberbandin...