Live data from Hacker News

How fighting games use delay-based and rollback netcode (2019)

ki.infil.net

71–80 of 107 posts

Re: How fighting games use delay-based and rollback netcode (2019)

#71

Earlier quoted context omitted.

> I wonder if any fighting games have thought to train a neural network per player to try and predict the player's actions N frames ahead. The entire point of playing a fighting game is to attempt to solve this problem. A good player, by necessity, can't be accurately predicted; if they could, they'd be a bad player.

There's only a few key moments where players need to be unpredictable to win a game. Almost all the rest of the time they are executing predictable consequences of those unpredictable choices. ie: imagine a player running to a ledge spanning a gap. The "naive" interpolation would be they continue running and fall off the ledge and die. A smarter system would realize that almost all the times they've run to the edge o…

> They could even jump at the median of all of your previous jumping choices and then lerp your position over time so you land at the correct point based on your actual jump.

I assume the interpolation relates to something displayed on the screen? The idea makes me kind of uncomfortable, because it seems like it would confuse players by causing identical jumps to display different results. If you only learn about jumping by watching the departure point and the landing point, fine, but if part of how you get used to jumping is by watching the animation, this sounds like it could make things a lot harder.

(If the player sees position data calculated locally, and the interpolation is just a process for bringing the remote idea of where the player is into line with the local idea of where he is, that sounds much better.)

Re: How fighting games use delay-based and rollback netcode (2019)

#72

Prediction code for rollback is somewhat akin to branch prediction code in that the dumbest solution works surprisingly well but there's incremental efficiency gains to be had. I wonder if any fighting games have thought to train a neural network per player to try and predict the player's actions N frames ahead. The neural nets could be used for smoother netcode but if the accuracy got high enough, they could, eg: al…

Definitely possible, but I doubt it could be both trained and/or performant on a single frame, which is what would be required. The other option would be to save all your replays, and have it be an option to train it on a server over several days, and then you can share your AI with others that can download it, but probably just for a fancy training AI, which can still be useful.

Re: How fighting games use delay-based and rollback netcode (2019)

#73
post #63

Does anyone know if rollback netcode works well in a 20+ player shooter game? I curious because the current craze of Battle Royals seems really taxing to the whole re-simulation of multiple frames within the window of a single frame. Without being any less subtle, games like Apex Legends is known for really bad server performance, latency, and among other things.

Overwatch uses a rollback model but it’s not inherently or obviously better than other games.

Re: How fighting games use delay-based and rollback netcode (2019)

#74
post #38

This piece was really interesting. That you can hide network delays by building a “fake” model of the other player that replicates what a real player would do and rolling back when this prediction fails. So you can train some neural nets on what players do in such situations and you get a certain accuracy. And yet you can keep making this “fake” player better and better until it’s indistinguishable from fighting a hu…

Where did you get the thing about neural networks? I read your comment before reading the article and was really disappointed the prediction "algorithm" (pioneered by GGPO in 2006 [0] and still used today) is literally "assume nothing changed", ie. the opponent is still holding down the same keys as the last frame. [0]: magazine article by the author of GGPO [pdf] https://drive.google.com/file/d/1cV0fY8e_SC1hIFF5E1rT…

As in this article, the base assumption is that a lot of the lag happens at moments where the input doesn’t matter that much. In fighting games, when characters are moving left and right or locked in a motion, in FPS when just moving around or shooting at hard to hit targets.

Predicting right is only important in short bursts at critical moments, and it’s also the hardest to predict and less forgiving moments, so I’d assume being conservative is the more cost effective and pragmatic choice.

Re: How fighting games use delay-based and rollback netcode (2019)

#75
post #63

Does anyone know if rollback netcode works well in a 20+ player shooter game? I curious because the current craze of Battle Royals seems really taxing to the whole re-simulation of multiple frames within the window of a single frame. Without being any less subtle, games like Apex Legends is known for really bad server performance, latency, and among other things.

I'm a pretty avid Call of Duty fan and have been playing ther Battle Royale, Warzone, a lot lately. Prior to this article, I've suspected there was some sort of predictive algorithm that helps make things smooth overall. I've noticed on a few occasions, I'll get shot by someone pre-firing a corner I haven't gone around yet (like sprinting to a corner to make a play). Several times, the kill cam has shown me fully aro…

Most FPS games suffer from “peekers advantage” due to the client side simulation of the player moving. Basically they can pop out or move around a corner and shoot before the movement has time to replicate from the server to you. The worse your latency the more advantage another player has.

Re: How fighting games use delay-based and rollback netcode (2019)

#76
post #24

Earlier quoted context omitted.

The fact that Fizzi was able to get implement rollback netcode for a game by just directly editing the assembly code without any access to a the game's source code is insane. The delay based netcode for the newest smash game, Smash Ultimate(2018), is so bad that it went from being the biggest fighting game of all time in terms competitive playerbase to basically having no scene at all due to covid killing lan tournam…

Was it done in-game? I figured it was done with the Dolphin (Gamecube) emulator, the same way GGPO was first implemented for arcade emulators.

I'm sure a lot of the work is done through the dolphin fork, but a lot of code also has to be injected into the melee iso as well. Which is why project slippi doesn't allow rollback for all dolphin games (sorry project M)

Re: How fighting games use delay-based and rollback netcode (2019)

#77
post #30
post #24

Earlier quoted context omitted.

The fact that Fizzi was able to get implement rollback netcode for a game by just directly editing the assembly code without any access to a the game's source code is insane. The delay based netcode for the newest smash game, Smash Ultimate(2018), is so bad that it went from being the biggest fighting game of all time in terms competitive playerbase to basically having no scene at all due to covid killing lan tournam…

> I wonder if this comparison is what caused nintendo to cease and desisted an online melee tournament that intended to use rollback. No, Nintendo famously doesn't bother to understand or pay attention to details like this. Their higher-ups can't be embarrassed because they barely understand the very concept of networking, let alone how it affects their own online multiplayer, let alone the distinction between delay-…

But they really aren't that predictable. There have been other events after the big house that didn't get a nastygram. Who knows why pokemon showdown is allowed to exist. The Melee community is pretty crazy though I would imagine if nintendo keeps coming at them they might just decompile the whole game and move to new version sanitized of nintendo ip.

Re: How fighting games use delay-based and rollback netcode (2019)

#78
post #23

Earlier quoted context omitted.

The fact that they were able to optimize two frames of input lag away to make the online gameplay have the same latency as offline is itself incredible. As far as I know, even other rollback-equipped fighting games still add a little bit of latency in order to play online without requiring constant rollbacks. That said, Melee is also a game that is very hard on the rollback, because movement and attack startup are fa…

I play Fox and worry that I jump all over the place. I play Melee on CRT with my wife all the time. Fox vs Sheik. Rollback sucks in comparison. Sheik teleports all over the place.

Depends on the ping. I would say once you start pushing 80 you can definitely feel it. But >60 ping rollback feels very good if you are playing on a good monitor.

Re: How fighting games use delay-based and rollback netcode (2019)

#79
post #52

Here's another great video on the subject: 8 Frames in 16ms: Rollback Networking in Mortal Kombat and Injustice 2 https://www.youtube.com/watch?v=7jb0FOcImdg One of my favorite topics, partially because there's not that much literature on the subject but it's so important

Thanks for the share. Very interesting video!

Re: How fighting games use delay-based and rollback netcode (2019)

#80

Relevant: GGPO, the age-old gold standard of rollback netcode, was recently open-sourced! https://github.com/pond3r/ggpo I haven't used it myself yet - mostly because I'd want Haskell bindings first hah

Around the time GGPO's source was published, I wrote a very, very simple fighting game to test how to use it. Maybe of interest to those in here: https://gitlab.com/DixieDev/ggpo_example/-/blob/master/main....
Post reply on HN