[HN Gopher] Riot Games: Peeking into Valorant's Netcode (2020)
___________________________________________________________________
Riot Games: Peeking into Valorant's Netcode (2020)
Author : jakey_bakey
Score : 116 points
Date : 2024-10-23 06:51 UTC (1 days ago)
(HTM) web link (technology.riotgames.com)
(TXT) w3m dump (technology.riotgames.com)
| jsheard wrote:
| 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.
| r1chardnl wrote:
| 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 wrote:
| 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 and shadows work
| correctly (Valorant sidesteps the shadow issue by simply not
| having players cast shadows). 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 wrote:
| 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 wrote:
| SMAC certainly predates Valve's official implementation,
| wouldn't be surprising if something else also did it.
| renewiltord wrote:
| Oh great video. Thanks for sharing. Surely the tick rate
| has to be lower on FACEIT as a consequence? Maybe this is
| why everyone in matchmaking would talk about it.
| hinkley wrote:
| I'm pretty sure the first wall hack I heard of was on the
| Quake engine so that must be something they fixed later on?
| sodality2 wrote:
| It's a matter of how aggressive is the fog of war and
| removal of irrelevant entities. Sometimes it's high,
| sometimes it's low. Too high, and people glitch into
| existence on high-latency connections. Too low, and you
| know exactly where people are far behind where you need to.
|
| Many custom servers in games like CS enable a more
| aggressive version, in cases where you geographically will
| be close, so you can rule out high latency connections and
| have more aggressive fog of war.
| hinkley wrote:
| I believe in the Quake case they made all the walls
| transparent so you could see everyone coming. Which means
| they weren't doing much fog of war at the time.
| xor42 wrote:
| Regarding the Quake engine and its evolutions (Q3, Call
| of duty, RTC Wolfenstein), the most common trick was to
| modify the rendering mode of all player entities so that
| they are drawn above everything else.
|
| The engine has a flag that is mainly used to draw the
| player's weapon (which is rendered above the rest). Using
| this flag for players was the "engine compliant" way of
| making a wall hack.
| theogravity wrote:
| 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
| jsheard wrote:
| That's weird, top-down games usually have a clearly defined
| fog-of-war so it's relatively simple for the server to
| withhold information that clients don't need to know. Maybe
| they cheaped out by using peer-to-peer netcode in that
| version, so there isn't an authoritative dedicated server?
| Hikikomori wrote:
| Their rather simple maps also help.
| nick_ wrote:
| IIRC Counter-Strike had it back in ~2002.
| jsheard wrote:
| I don't think it did officially, there were definitely server
| plugins that did it back in the day but AFAICT it wasn't
| official until this 2015 update:
|
| https://old.reddit.com/r/GlobalOffensive/comments/37ebes/maj.
| ..
|
| > Added trace-based visibility checks to prevent networking
| invisible enemy players.
|
| If you're remembering playing with the r_drawothermodels
| console command to get a faux-wallhack effect, that was still
| subject to the engines _clientside_ occlusion culling so it
| didn 't show everything the client (and real cheats) were
| actually aware of.
| nick_ wrote:
| I'm referring to CS 1.2 or so, back in ~2002.
|
| The thing I remember was that my friend's graphics card had
| a global transparency setting built in (AKA a wall-hack
| mode lol). You could see other players come into view as
| soon as the came into an area that was rendered. Then a CS
| patch came out and the players weren't visible until very
| shortly before they would become visible had we not had the
| uhh... transparency mode on haha.
| jsheard wrote:
| Yeah that's the same deal as r_drawothermodels, crudely
| forcing the GPU to render objects that are behind other
| objects would give you a _partial_ wallhack, but that
| wouldn 't disable the engines occlusion culling so once
| it determined that an object was definitely no longer
| visible it would skip drawing it altogether, and you
| would stop seeing it through walls. "True" wallhacks were
| able to override the clients occlusion culling and reveal
| everything, so to defend against that the occlusion
| culling needs to happen on the server, which came much
| later.
| nick_ wrote:
| Oh interesting. Thanks! We must have assumed it was
| client-side and gave up.
| Sohcahtoa82 wrote:
| 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 _dis_ advantage
| when peeking towards someone with a 30 ms ping?
| ncr100 wrote:
| Ha! "Hax0r!1!@~"
|
| Did you feel it potentially made the game MORE fun for you,
| having that high ping? I presume yes?
| legohead wrote:
| 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.
| andrewmcwatters wrote:
| Most likely not, because modern game engines take a timestamp
| of your command packets and do relativistic calculations on
| when you clicked versus another player, and how that affects
| hitscan and projectile-based weapons.
|
| Those timestamps are compared to a window against the server's
| and other players'.
| bob1029 wrote:
| > I wonder if having such low ping actually gave me a
| disadvantage when peeking towards someone with a 30 ms ping?
|
| Yes. Counterintuitively, the players with the worst connections
| often get away with the most ridiculous nonsense.
| ncr100 wrote:
| 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.
| aleksiy123 wrote:
| 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.
| hinkley wrote:
| "Doors and corners" as Detective Miller was fond of saying.
| dmoy wrote:
| Staircases too. There's one of the more respected
| instructors up near here in northern Oregon who does
| civilian tactical training stuff. Which is not my cup of
| tea, but it is interesting listening to the guy rant. He
| has what appears to be a deep seated fear/loathing for
| staircases.
| enragedcacti wrote:
| 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
| DSMan195276 wrote:
| 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.
| alephxyz wrote:
| That's why you pre-fire around corners and through doors
| andrewmcwatters wrote:
| 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.
| yayitswei wrote:
| 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.
| dpratt wrote:
| Any discussion of the game's requirement to install kernel-level
| anticheat hooks that inspect the memory of every process running
| on the system?
| Hikikomori wrote:
| Basically the only anti cheat that is somewhat successful.
| Secure multiplayer matchmaking has its price unfortunately.
|
| But any process your user runs can read memory of other
| processes of the same user, Windows provides an API for it. So
| its not just kernel stuff that is scary.
| HideousKojima wrote:
| >Basically the only anti cheat that is somewhat successful.
|
| And yet Valorant and every other game with kernel-level
| anticheat seems to have been hacked anyways
| Hikikomori wrote:
| Its not bulletproof, but nothing really can be on the PC
| platform as it is today. Which is why I said somewhat
| successful, as no other anti cheat comes close.
| serf wrote:
| it's not really a PC problem, its an attestability
| problem.
|
| Even with kernel level nonsense a cheat can be made
| technically undetectable by essentially making a 'player
| robot' that uses a camera and CV to watch a screen and
| traditional mouse/keyboard interfaces. It'll only be
| detectable via player-action/movement heuristics and
| 'best guesses', and it needs no hooks into software or
| OS.
|
| This type of 'bot' is going to explode across consoles
| and the like soon given the focus on AI with general
| purpose reasoning; you can already _easily_ implement
| this style of bot against slow paced games like mahjong
| or poker inferring against big clunky slow image-
| inferring LLMs; given how easy most coding LLMs can spit
| out the code for specialty CNNs when knowing the criteria
| we 're going to see this kind of cheating get a lot more
| accessible.
|
| And I mean this practically. Go talk to Claude or ChatGPT
| about making a bot in this fashion for just about any
| slower paced deliberate-action game -- it's shockingly
| good at doing so with very little user input. Provide it
| with a few screenshots of the interface and it can even
| automate finding the bounding boxes or whatever other
| thing-of-interest you need to coordinate purely by
| description -- the barrier to entry for game cheating is
| lower than i've ever seen it , and that's one of the
| things I did for a living for a portion of my youth.
| Syntaf wrote:
| I can't help but envy the engineers in this article as I sit
| here, procrastinating my fulltime career as a glorified CRUD
| engineer with complementary soft skills.
|
| Maybe the grass is always greener, but it just sounds like an
| incredible opportunity for anyone working on the Valorant team.
| You get to solve challenging, interesting problems that hundreds
| of millions of users will benefit from, that's just so cool to
| me.
| ldoughty wrote:
| I generally agree that "the grass is greener" is common for IT
| people I think. It's a huge field, and you hear about people
| doing cool things all the time.
|
| But on the flip side, that one cool thing might be the ONLY
| thing they do, all day, every day, which might not be as cool
| after 6-10 years.
|
| But I do think your point about benefitting large numbers of
| people is a strong motivator..that's partly what academia
| relies on to keep employees as below-market rates -- the
| mission oriented drive to make the future better. I don't mean
| to poke at that issue specifically, but it's a great example of
| how teachers, etc. will continue to work for pennies as long as
| they can afford it (it's almost abusive).. but that drive is a
| critical part of their personal happiness
| devmor wrote:
| I find it kind of weird that this is framed like a novel solution
| and discovery process when this has existed since the early
| 2000's in other tactical FPS games.
|
| Did the author did no research into the competition/precursors
| before going down this path?
|
| Did they lie to make it seem more impressive?
|
| Whatever the case, it's odd.
___________________________________________________________________
(page generated 2024-10-24 23:00 UTC)