Skip to main content
  • Biz & IT
  • Tech
  • Science
  • Policy
  • Cars
  • Gaming & Culture
  • Store
  • Forums
Subscribe
Close
Sign in

Rollin' Back —

Explaining how fighting games use delay-based and rollback netcode

How to design your game for optimal play over a network.

Ricky Pusch - 10/18/2019, 3:07 PM

Explaining how fighting games use delay-based and rollback netcode
Enlarge
Aurich Lawson / Capcom / Getty Images

reader comments

128 with 50 posters participating

Share this story

  • Share on Facebook
  • Share on Twitter
  • Share on Reddit
Ricky "Infil" Pusch is a long-time fighting game fan and content creator. He wrote The Complete Killer Instinct Guide, an interactive and comprehensive website for learning about Killer Instinct. This article was originally published there.

Hang around the fighting game community for any period of time, and you'll hear discussion about why playing fighting games online can be frustrating. A genre built on twitch reflexes and player reactions, fighting games can struggle at times to translate their offline success to online environments. Good online play is possible, though, and nothing is more important for realizing this goal than choosing the right approach to netcode.

At its core, netcode is simply a method for two or more computers, each trying to play the same game, to talk to each other over the Internet. While local play always ensures that all player inputs arrive and are processed at the same time, networks are constantly unstable in ways the game cannot control or predict. Information sent to your opponent may be delayed, arrive out of order, or become lost entirely depending on dozens of factors, including the physical distance to your opponent, whether you’re on a Wi-Fi connection, and whether your roommate is watching Netflix.

Online play in games is nothing new, but fighting games have their own set of unique challenges. They tend to involve direct connections to other players, unlike many other popular game genres, and low, consistent latency is extremely important because muscle memory and reactions are at the core of virtually every fighting game. As a result, two prominent strategies have emerged for playing fighting games online: delay-based netcode and rollback netcode.

There’s been a renewed sense in the fighting game community that rollback is the best choice, and fighting game developers who choose to use delay-based netcode are preventing the growth of the genre. While people have been passionate about this topic for many years, frustrations continue to rise as new, otherwise excellent games repeatedly have bad online experiences.

There are relatively few easy-to-follow explanations for what exactly rollback netcode is, how it works, and why it is so good at hiding the effects of bad connections (though there are some). Because I feel this topic is extremely important for the future health of the fighting game community, I want to help squash some misconceptions about netcode and explain both netcode strategies thoroughly so everyone can be informed as they discuss. If you stick around to the end, I’ll even interview some industry experts and community leaders on the topic!

Before we dig into the details, though, let’s get one thing straight.

Why should I care?

Both companies and players should care about good netcode because playing online is no longer the future—it's the present.

While most other video game genres have been this way for a decade or longer, fighting game developers seem to be resistant to embracing online play, perhaps because of the genre’s roots in offline settings such as arcades and tournaments. Playing offline is great, and it will always have considerable value in fighting games, but it’s simply the reality that a large percentage of the player base will never play offline. For many fighting game fans, playing online is the game, and a bad online experience prevents them from getting better, playing or recommending the game to their friends, and ultimately causes them to simply go do something else.

Even if you think you have a good connection, or live in an area of the world with robust Internet infrastructure, good netcode is still mandatory. Plus, lost or delayed information happens regularly even on the best networks, and poor netcode can actively hamper matches no matter how smooth the conditions may be. Good netcode also has the benefit of connecting regions across greater distances, effectively uniting the global player base as much as possible.

Video Player
Bad netcode can ruin matches. This match, played online between two Japanese players, impacted who gets to attend the Capcom Pro Tour finals. (source)https://cdn.arstechnica.net/wp-content/uploads/2019/10/FaithfulImmaculateBug.mp4
Error loading this resource
Bad netcode can ruin matches. This match, played online between two Japanese players, impacted who gets to attend the Capcom Pro Tour finals. (source)

What about those who never play online because they prefer playing offline with their friends? The healthy ecosystem that good netcode creates around a game benefits everyone. There will be more active players, more chances to consume content for your favorite game—from tech videos to spectating online tournaments to expanding the strategy of lesser-used characters—and more excitement surrounding your game in the fighting game community (FGC). Despite Killer Instinct’s pedigree as an excellent game, there’s no doubt that its superb rollback netcode has played a huge part in the sustained growth of its community.

Good netcode matters, period. So let’s talk about it.

Page: 1
jump to endpage 1 of 7

The basics

Before we get into the specifics of how the two netcode strategies work, we first have to set a few ground rules that govern fighting games and introduce a few terms.

In fighting games, time is measured in a unit called a frame. Just to make the discussion easier, we’ll assume that all fighting games operate at 60 frames per second, which means that one frame is around 16 milliseconds (ms) of real time.

Importantly, this isn’t just how fast the game renders new images to your screen; every frame, the game executes its game loop, which (among other things) asks the players’ controllers for inputs, checks the network for new information, runs AI for any CPU players, animates the moves each character is doing, and checks if someone is now getting hit. After it has done all these things, it draws the results of all its calculations to the screen, then does it all again 16 milliseconds later. In fighting games, this loop needs to be tight and consistent for all players who play your game, regardless of how fast or slow their computer is.

When playing a fighting game offline against your friend, you connect two controllers to one computer or console. If you both happen to press a button within the same 16 millisecond window, the game will receive and process the inputs on the same frame and apply the logic as expected. You will both see the same output, because there is only one computer doing the calculations.

The inputs for each player are shown at the bottom. When playing offline, there is no trouble processing all inputs for both players as soon as they are pressed.https://cdn.arstechnica.net/wp-content/uploads/2019/10/DishonestEnragedBeetle.mp4
The inputs for each player are shown at the bottom. When playing offline, there is no trouble processing all inputs for both players as soon as they are pressed.

The inputs for each player are shown at the bottom. When playing offline, there is no trouble processing all inputs for both players as soon as they are pressed.

This changes when two players are playing over the Internet.

First of all, information always takes time to send through a network. This is measured in ping, the amount of time it takes for information to be sent to the other player and then back to you. Over a connection with 90ms ping, for example, it takes 45ms (on average) for information to reach the other side, which is about three in-game frames. This means games now need to be clever about how they handle the input part of their game loop, as they can no longer guarantee button presses for the remote player will line up with the local player.

When playing online, your own inputs are still processed immediately, but the remote player's inputs now take time to travel over the network. The game needs to decide how to handle this so both games remain in sync.https://cdn.arstechnica.net/wp-content/uploads/2019/10/SnoopyApprehensiveBettong.mp4
When playing online, your own inputs are still processed immediately, but the remote player's inputs now take time to travel over the network. The game needs to decide how to handle this so both games remain in sync.

Secondly, two different computers are now trying to run two copies of the game at the same time but still produce identical results for both players. That’s why it’s a great idea for fighting games to be deterministic—given identical inputs, every machine that runs the game must produce identical results. This is cool for non-networking features like replays because you can simply save the inputs from each player and always reconstruct the match perfectly, but it also means the game only needs to send player inputs over the network to play online matches. We get to avoid sending complicated information about the game state and can save a lot of bandwidth.

When games send information to each other and then rely on the computers to independently run the simulations in sync, it’s said they are using lockstep networking. They don’t talk to a central authority that keeps track of the game for them and tells them what to do, like a server. Instead, they police themselves by asking each other periodically if they have the same game state. If the games start to disagree about the state of the game, they are desynced and will probably just have to abandon the match entirely. Games talking to each other directly can often be faster than being forced to talk through an intermediary, and lockstep solutions are particularly good at preventing many types of cheating. For example, even if you hacked your game so Ryu can throw faster fireballs, my simulation of the game won’t agree with yours and we will quickly desync.

Now, after all this setup, we can finally get to the meat of the problem. If we have a deterministic fighting game that uses lockstep networking, the only thing we need to play online matches is the input from both players. Let’s talk about these "clever ways" a fighting game handles player inputs that are never received on time.

Page: 1 2 3 4 5 6 7 Next →

reader comments

128 with 50 posters participating

Share this story

  • Share on Facebook
  • Share on Twitter
  • Share on Reddit

Channel Ars Technica

Customizing Mini 4WD Racers For High Speeds On A Small Scale

Randy Holt, owner of Hobbytown in Toms River, NJ, takes us inside the world of Mini 4WD Racing - a venerable pastime experiencing a new boom in popularity. Randy breaks down the engineering challenges that Mini 4WD drivers need to overcome, and all the tiny gear and tech they use to make it happen. And to help you get started on your own Mini 4WD obsession, Randy unboxes and explains how to assemble a brand new Toyota Gazoo Racing WRT Yaris WRC.

  • Customizing Mini 4WD Racers For High Speeds On A Small Scale
    Customizing Mini 4WD Racers For High Speeds On A Small Scale
  • How Mind Control Saved Oddworld: Abe's Oddysee
    How Mind Control Saved Oddworld: Abe's Oddysee
  • Nintendo's Corey Olcsvary plays your Super Mario Maker 2 levels
    Nintendo's Corey Olcsvary plays your Super Mario Maker 2 levels
  • Bioware answers unsolved mysteries of the Mass Effect universe
    Bioware answers unsolved mysteries of the Mass Effect universe
  • First Look: Nintendo Ring Fit Adventure
    First Look: Nintendo Ring Fit Adventure
  • Civilization: It's good to take turns | War Stories
    Civilization: It's good to take turns | War Stories
  • Dead Cells: How to avoid falling to your death (and resurrection) | War Stories
    Dead Cells: How to avoid falling to your death (and resurrection) | War Stories
  • Warframe's Rebecca Ford reviews your characters
    Warframe's Rebecca Ford reviews your characters
  • Subnautica: A world without guns | War Stories
    Subnautica: A world without guns | War Stories
  • This War of Mine | War Stories
    This War of Mine | War Stories
  • Return of the Obra Dinn: Lost in translation | War Stories
    Return of the Obra Dinn: Lost in translation | War Stories
  • How Slay the Spire’s Original Interface Almost Killed the Game | War Stories
    How Slay the Spire’s Original Interface Almost Killed the Game | War Stories
  • Amnesia: The Dark Descent - The horror facade | War Stories
    Amnesia: The Dark Descent - The horror facade | War Stories
  • Command & Conquer: Tiberian Sun | War Stories
    Command & Conquer: Tiberian Sun | War Stories
  • Blade Runner: Skinjobs, voxels, and future noir | War Stories
    Blade Runner: Skinjobs, voxels, and future noir | War Stories
  • Dead Space: The drag tentacle | War Stories
    Dead Space: The drag tentacle | War Stories
  • Aliens versus Predator: The 11th hour decision | War Stories
    Aliens versus Predator: The 11th hour decision | War Stories
  • Serious Sam: Saved by a vertical slice | War Stories
    Serious Sam: Saved by a vertical slice | War Stories
  • Star Control: Science non-fiction | War Stories
    Star Control: Science non-fiction | War Stories
  •  Ultima Online: The Virtual Ecology | War Stories
    Ultima Online: The Virtual Ecology | War Stories
  • First Look: Xbox Adaptive Controller
    First Look: Xbox Adaptive Controller
  • Blizzard answers unsolved mysteries of the Hearthstone universe
    Blizzard answers unsolved mysteries of the Hearthstone universe
  • Unsolved mysteries of Warframe
    Unsolved mysteries of Warframe
  • Unsolved mysteries of League of Legends
    Unsolved mysteries of League of Legends
More videos
← Previous story Next story →

Related Stories

    Sponsored Stories

    Powered by

      Today on Ars

        • Store
        • Subscribe
        • About Us
        • RSS Feeds
        • View Mobile Site
        • Contact Us
        • Staff
        • Advertise with us
        • Reprints

        Newsletter Signup

        Join the Ars Orbital Transmission mailing list to get weekly updates delivered to your inbox.

        Sign me up →

        CNMN Collection
        WIRED Media Group
        © 2020 Condé Nast. All rights reserved. Use of and/or registration on any portion of this site constitutes acceptance of our User Agreement (updated 5/25/18) and Privacy Policy and Cookie Statement (updated 5/25/18) and Ars Technica Addendum (effective 8/21/2018). Ars may earn compensation on sales from links on this site. Read our affiliate link policy.
        Your California Privacy Rights
        The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Condé Nast.
        Ad Choices

        // // //