by ThatPlayer · 2y ago · 0 comments
Games like Starcraft 1 would handle it by adding an artificial delay to your inputs (and all your opponent's inputs). Putting it into a buffer for future steps instead. If anyone remembers the latency option for "Extra high latency", this would increase the delay on inputs so that simulations did not have to pause while waiting for inputs from other clients. And then if any network fluctuations causes your input buffer of other clients to empty, you have to pause again.
In fighting games this is usually called delay-based netcode, and people hate it. It makes your inputs feel unresponsive, and in games that require fast reactions (like fighting games) gives you a smaller window to react.
I doubt that'll scale to games like Starcraft and Factorio, because in my example, you would need to resimulate 100ms of simulations in ~16ms. In a fighting game with 2 characters and not much else to simulate, that's a lot easier.
Recently I’ve been playing Arma Reforger with friends online on a dedicated server, and when driving vehicles the collision physics are off, especially when driving fast, making the whole scene “teleport” forward, with frames lost and the vehicle reappearing in unexpected positions.
I wonder if this is related to this type of code. The game is technically out of early access, but there’s lots to be added still on the roadmap.