Riot Games: Peeking into Valorant's Netcode (2020)

(technology.riotgames.com)

65 points | by jakey_bakey a day ago ago

18 comments

  • jsheard 2 hours ago

    A related article on refining their netcode to minimise the usefulness of wallhacks:

    https://technology.riotgames.com/news/demolishing-wallhacks-...

    Not many first person games have that "fog of war", it turns out to be quite hard to implement well.

    • theogravity 19 minutes ago

      I'm not sure if the fog of war anti-hack applies to League of Legends: Wild Rift (mobile version of LoL) since there are map hacks where you can see enemy positions going around:

      https://www.youtube.com/watch?v=pGKZCQoqEOk

      https://www.youtube.com/watch?v=V600M8NqpzM

    • r1chardnl an hour ago

      Didn't most first person games have this automatically because of using the Quake engine due to their PVS system? It was used to reduce drawing overhead but also beneficial in not sending more data than needed and preserve bandwidth serversided.

      • jsheard an hour ago

        AFAIK no they didn't, Valves engines are from the Quake lineage and still use PVS but they only added serverside fog-of-war to Counter Strike relatively recently in ~2015. As the Valorant article goes into, it's a harder problem than it appears because you need to allow the client some wiggle room to know an enemy in coming around a corner before the player sees them so that lag compensation works correctly. Plus PVS is quite coarse so if you want precise culling you need a more computationally expensive solution.

        This video compares Valves own fog-of-war implementation to the implementation used by FACEIT, a third party competitive matchmaking service, which shows there's a pretty wide range of trade-offs to be made. Valve went for conservative and fast, while FACEIT went for aggressive and (presumably) slow:

        https://www.youtube.com/watch?v=8w1ICIBO3D4

        Valves implementation is better than nothing, it at least stops cheaters from knowing which direction the other team is going at the start of a round, but beyond that it doesn't stop them from knowing exactly where most enemies are standing around corners because the serverside visibility checks are so coarse.

        • ancieque an hour ago

          I remember installing a metamod plugin to my cs 1.5 Server that added server side fog of war iirc. But i could be mixing things up.

          • shaokind an hour ago

            SMAC certainly predates Valve’s official implementation, wouldn’t be surprising if something else also did it.

  • ncr100 2 hours ago

    Awesome insight.

    While playing FPS', I wondered why corners were a point of contention for me, both in dying or killing, and now I have additional insight.

    I can sit at a corner and die from an oncoming enemy, or I can take the corner and take the enemy. I assumed it was all due to my own biological perceptual system, and now I see the synchronization would be giving each player an advantage depending upon who's overtaking the corner.

    • DSMan195276 5 minutes ago

      Keep in mind that you're wider than the single spot you see from, it's possible for your opponent to see part of you before you can see your opponent at all. Who can see the other first depends on who is farther from the corner, as they see past it at a shallower angle.

    • aleksiy123 an hour ago

      Gunplay in FPS games like CSGO and Valorant are all about angles. Almost all of the action happens in the split moments of contact, as players transition from not seeing each other to seeing each other.

      So in that sense, corners are pretty much a point of contention for everyone at every level since most of the game is based around taking and holding corners/angles.

      The peeker vs holder relationship is pretty interesting to analyze as there is more to it then just server sync. But how both players try minimize/isolate the amount of angles they attack/are exposed at any given point in time.

      As well as use their general game knowledge to make predictions about where the enemy is most likely to be in a certain situation. Prioritizing their attention/crosshair on those angles while ignoring the others.

      I think this what makes it fun. Theirs a lot of thinking + buildup/anticipation for the moment of contact between players which is then usually resolved in <1s. And since the dead player has to then sit out the round it feels meaningful.

    • enragedcacti 15 minutes ago

      Being further from the corner than your opponent also gives a big advantage since for any given angle as you peek you will see more of your opponent than they see of you.

      https://x.com/RiotTuxedo/status/1250637504895541248

    • alephxyz 3 minutes ago

      That's why you pre-fire around corners and through doors

  • yayitswei 43 minutes ago

    For comparison, here's a talk about Overwatch's netcode: https://youtu.be/W3aieHjyNvw

    Overwatch has a long time-to-kill, interesting to compare tradeoffs.

  • Sohcahtoa82 2 hours ago

    My fun anecdote...

    Some of Valorant's game servers are hosted in a data center very close to my house. When I played, my ping was in the single digit milliseconds. Some people accused me of being a Riot employee.

    Of course, that low ping didn't prevent me from being utter trash. My K/D ratio was usually around 0.3.

    Come to think of it, seeing the network buffering they perform, I wonder if having such low ping actually gave me a disadvantage when peeking towards someone with a 30 ms ping?

    • legohead 33 minutes ago

      Back in the early days of the internet when it was mostly connecting to universities, there was a popular PK mud hosted at the university I went to. So I had a massive advantage in that game. Game hackers weren't really a thing so people just assumed I was amazing at the game.

    • ncr100 2 hours ago

      Ha! "Hax0r!1!@~"

      Did you feel it potentially made the game MORE fun for you, having that high ping? I presume yes?

  • dpratt 12 minutes ago

    Any discussion of the game’s requirement to install kernel-level anticheat hooks that inspect the memory of every process running on the system?

  • andrewmcwatters an hour ago

    It's sort of neat that the same FPS networking fundamentals have stood the test of 25 years of game time, and it's a good historical lesson for those entering the industry or hobbyists to just study what architecture came out of Quakeworld.

  • ilrwbwrkhv an hour ago

    This is real programming. I wonder if the javascript devs learn some of this instead of wasting time on Typescript and NextJS, they will learn how much complexity they are creating for so little benefit (literally to toggle a checkbox)