Hacker News new | past | comments | ask | show | jobs | submit login

Most likely, this is similar to NVIDIA reflex. In that case, they simply wait in the engine loop directly before mouse and keyboard entry are handled. That way, the GPU can process this new data immediately (as opposed to first waiting for vsync) and thereby overall latency is reduced.



Why would this be considered an illegal cheat? In a networked game, shouldn't the only determinative factor be whose input arrives at the server first?


The server doesn't always decide. It's common for shooters to want to guarantee that if it looks like you shot the other player on your screen, the game will react as if you shot the other player, even if the server would have considered it a miss due to timing differences. Those things can really only be done by trusting the client not to lie, which means verifying that the client hasn't been tampered with.

Plus, there's a lot of cases where the server sends some pieces of information to the client but the user isn't supposed to see it. The locations of the other players is a common example, where people modify their client to render outlines of players through walls. That's a huge advantage but doesn't even affect anything hit registration related.


> It's common for shooters to want to guarantee that if it looks like you shot the other player on your screen, the game will react as if you shot the other player, even if the server would have considered it a miss due to timing differences. Those things can really only be done by trusting the client not to lie, which means verifying that the client hasn't been tampered with.

Why does server-authoritative backwards reconciliation require trusting the client not to lie? The server keeps a history of the past N states and client claims to hits are verified by the server using that history. A client could lie and say it made a hit in one of those prior states (but not an state the client invented whole cloth.) But if the client is doing that then from the server's perspective that player is lagging and backwards reconciliation makes lagging players easier for other players to hit.

Obviously if you're doing client-authoritative unlagging then you need anticheat, but AFAIK competitive shooters have used server authoritative backwards reconciliation ever since the early 00s.


If the target is moving and the shooter is moving their crosshair, there doesn't have to be a single server-side state where where shooter's crosshair is on the target's hitbox. Yet the shooter, being usually tens or hundreds of milliseconds out of sync with the server yet responding instantly to player input, might have had their crosshair right on the target's hitbox when they click the shoot button. Modern games usually still want to register that as a hit; it's a principle is called "favor the shooter". I don't see how that doesn't mean reacting to a state which the client invented whole cloth?

Not that this really matters. If you think that you could do favor the shooter style hit registration in a completely server authoritative way, we can just use wall hacks or aim bots as an example instead.


If you read deep into the community and play something like modern warfare 2 2022 (mw2) you'll see quite often the game seems to purposely lag players and decide outcomes on a per engagement basis. kill cams show a totally different set of events than what you saw on say a decent PC such as running around a corner and you shot first but kill cam shows the opposite. they aren't just doing de lag or whatever they are balancing kill death ratios too.


This makes me wonder—how much performance would you loose by taking a "distrusted client" approach, and only sending data that you want the player to know about? Could you make cheating basically impossible?


Valorant and Counter-Strike attempt to do this as much as they can, not sending information about enemies the player shouldn't be able to see. This is not flawless, though, probably due to performance or latency requirements.

Iirc, Warzone also sends information about non-existing players to suspected cheaters to attempt detecting aimbots.


I think the client also receives information about non-visible-but-nearby players for things like footstep noises. In counter strike you can hear a person around the corner running around, reloading, etc. and I think in some cases you can shoot through thin walls at these players. Even if they are completely obscured from view.


> in some cases you can shoot through thin walls at these players

Not just that, you can even chuck a flashbang/grenade far outside your visibility range and get someone this way too.


Yep exactly. I had a nice 5.1 surround setup for cs 1.0+ and got accused of cheating but I could tell easily people were running behind me and prepare



In this particular case anything hooking itself into game code is considered cheating.


Ah, so it's considered a "bot" because the game is expecting something to reach the display before a human responded? The card isn't doing any network input, so something must be checking if the state was blitted before the human response...(?!)


It's not considered bot or anything. It's just Valve forbids any software signed or unsigned to mess with game executable, data or memory without being specifically whitelisted.

Why? Because even if software doing this is legitimate it's can still be used by actual cheaters by patching it.


It’s a nice clear line in the sand. The program is a black box. Do not inspect or augment it.


It's considered a "bot" because it injects its own code into the game itself, which is what cheats do.


Wall hacks are also a type of cheating that doesn't require changing your communication to the server


They are being banned for the game code being modified in memory, the anti cheat knows nothing about the fact that input latency was decreased. And no, reducing input latency is not considered a cheat, anywhere, no game does that.


Yep exactly. It does remind me of the story of someone coming to quake con in the 90s though and using a "feature" of idtech game engines where it tied a lot of code to frame rate and thus once you get enough fps, time accelerated effectively for that player. I think it was ruled not a cheat for that season (I could be wrong it's been over 20 years) but discouraged for future years.


Not sure if that's what you're referring to, but quake 3 physics behaved differently based on the client frame rate. 125Hz made all of the physics steps round up when jumping, allowing for just a little extra height that allowed for some jumps.


'weird' i/o hooks and erratic timing are big red flags for anti-cheats.


My guess: this changes the timing profile of the overall game/engine. If the engine monitors itself for erratic/unexpected delays, it may conclude that it's running under a debugger if certain procedures take far longer (or shorter) than they should.


You can literally check if something has attached itself to your executable or replaced a DLL. No need to check for timings or anything particularly elaborate.


Cheats will of course attempt to disguise such tampering


Wait, how does exactly this work? As I understand it works something like this: mouse/keyboard input -> driver -> game engine -> graphic engine -> GPU. So, what exactly NVIDIA reflex (and Radeon lag+) did? How does intercepting commands in game engine helps the performance of GPU?

Upd: I did read explanation of Nvidia reflex (NVIDIA Reflex keeps the CPU perfectly in sync with the GPU to eliminate the render queue.) and still not sure that I understand. Why developers of game did not implemented this fix themselves?


The first step to reducing input latency is to eliminate the frame queue. Usually the driver allows the CPU to submit up to 3 frames worth of rendering commands, which means that on a 60Hz monitor the image being displayed could represent input from up to 45ms ago because of the frame queue.

The frame queue exists to eliminate GPU bubbles where the GPU sits idle waiting for the CPU to send new rendering commands. If the game developer puts in the work of eliminating these GPU bubbles as much as possible then it's possible to turn off the frame queue while maintaining a good frame rate.

This step of reducing latency does not require intercepting any calls and is probably what is being done in AMD Anti-Lag. However there is a further step to reducing input latency that AMD called Anti-Lag+ that does require extra hooks in the engine. I explained that in this comment: https://news.ycombinator.com/item?id=37879517


Are you describing triple buffering? Competitive gamers generally know to leave that off in the settings.


Triple buffering maintains a queue* of fully rendered frames ready to be displayed by the monitor. What I'm talking about is a queue of rendering commands for frames that still need to be rendered by the GPU.

* triple buffering does not actually use a queue, but rather two buffer swaps, which means a frame is allowed to skip ahead if completed early.


Ah okay I get the distinction now thanks. I wasn’t aware of the form you were describing.


Turning it off means doing what instead? No vsync at all will certainly give you faster updates, if you don't mind the tearing. But in general I would describe triple buffering as a way to reduce lag when vsync is on but your system is fast.


That seems like something any engine programmer would implement on their own. Could it really be so simple?

I guess if NVIDIA does it, then it must help. How odd.


Nvidia reflex works by inserting a wait before input processing that dynamically adjusts so that the frame completes rendering right before the monitor's v-blank. Thereby reducing the amount of time the completed frame sits idle in the backbuffer, which in turn reduces the delta between when input is sampled and when the frame is displayed.

To do this effectively is very difficult without a complete view of the pipeline all the way to the display. That is why a feature like that works best when the driver and game engine work together rather than either side attempting to implement it unilaterally.

It seems that AMD attempted to implement this feature without help from the game developer by hooking the Windows input APIs directly.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: