about 5 years ago - DerekMulder-1909 - Direct link

Hi everyone! I’m Derek, a gameplay engineer on Overwatch and wanted to run through this new feature in version 1.42, and exactly what it does and how it works.

First, a quick summary on how aiming and shooting happens in Overwatch. Overwatch simulates (or ticks) every 16 milliseconds, or at 62.5Hz. Each tick, we update the players aiming direction based on whatever raw inputs we’ve received from the mouse hardware since the previous tick. If the player has pressed primary fire, we then launch their shot in that direction (assuming they are alive, have ammo, aren’t in the middle of some other action, etc.)

Despite this being a conventional way of handling mouse input in a first-person shooter, we wanted to do better. Many gaming mice these days support 500Hz, 1000Hz or even more in terms of polling rates. At 1000Hz, this means the mouse movement done between game ticks can be done by as many as 16 discrete mouse movements delivered from the hardware. An example here may help.

https://bnetcmsus-a.akamaihd.net/cms/gallery/n8/N8F0X0MTKB861572454296117.mp4

This is a simulated flick in Overwatch. By simulated I mean uniform mouse movement per mouse polling frame, which isn’t how humans move a mouse, but is helpful for purposes of explanation.

From above, here’s what it looks like:

https://bnetcmsus-a.akamaihd.net/cms/gallery/wv/WVC67OCHZS5H1572976495876.mp4

The white lines are where the player’s aim direction is pointing every 16ms.

Now we add in red lines, drawing where the player is aiming after every received mouse input @1000Hz:

https://bnetcmsus-a.akamaihd.net/cms/gallery/6a/6AKS8B0IM7OK1572454426861.mp4

With the new High Precision option enabled, projectiles can now travel down any of the red lines! This means you can also functionally shoot between rendered frames (or at high fps, on rendered frames that are in between ticks):

https://bnetcmsus-a.akamaihd.net/cms/gallery/7h/7HSDTAYXJCEU1572454451712.mp4

Some additional things worth noting:

This will not change how it “feels” to look around. Looking around will feel the same as it always has, since the final rendered view always took into account any and all raw input messages received from hardware prior to that frame.

Enabling this option does come with a small CPU cost overhead.

Subframe aiming only takes place when a mouse button is either going down or up, and only when using primary or secondary fire. Ie: Holding down primary fire for tracking type weapons will not have any changes to how it behaves.

We hope you enjoy this new feature! We’re always reading and looking for feedback, so please let us know what you think!

about 5 years ago - DerekMulder-1909 - Direct link

An update with some clarifications and answers to common questions I’ve seen:

Commands and logic still happen on tick boundaries, but for shots that were triggered between tick boundaries we re-position the game state to that sub-tick frame of reference for hit detection (for example, if you fired 8ms before a tick boundary, we rewind both yourself and others backwards in time by an extra 8ms so that everything lines up w/ that point in time).

We do update the players most up to date view/aim direction every rendered frame, but this is cosmetic only relative to the logic update rate.

Client framerate doesn’t matter for the server, since we never send more than one input per tick to the server.

It’s not an interpolation between end of tick inputs, we’re actually using where you’re aiming when you click.

As has been noted by others, this is only affected by the polling rate of the mouse hardware, the DPI and sensitivity don’t matter. The system is set up polling rate agnostic, and should handle any update rate mouse hardware wants to throw at it, though technically the higher your polling rate, the bigger the CPU cost (though still small).

Speaking of polling, a clarification: Both with and without this option, Overwatch doesn’t directly poll mouse inputs. The mouse hardware sends raw input messages to the game at it’s polling rate, and then we process all those messages on every frame.