## December 13, 2012

### What is aim acceleration?

In shooting games, aim acceleration is related to how a physical movement of the input device, such as an analog stick, is translated into changes in the shooter's look direction. More specifically, it refers to the way that many console FPS games limit abrupt increases in the shooter's rotation speed by slowly ramping up the speed over time. The concept is somewhat analogous to platform games where the character model's running speed accumulates before reaching its maximum, except applied to rotational movement instead of linear movement.

I prefer the term 'aim smoothing' to describe the filtering of twitchy analog stick movements into a more gradual turning motion. Acceleration, by definition, occurs whether the changes in rotation speed are instantaneous or very slow. The confusion arises when people refer to games as having "more acceleration" when what they actually mean is that the increase in turning speed requires more time, i.e., lower acceleration.

Presumably, rather than attempting to accurately simulate real world physics, the main purpose of aim smoothing is to prevent rapid swings in look direction which could make aiming or changing direction feel difficult to control for the player. It therefore might be viewed as a primitive form of assistance for manipulating the analog stick. However, smoothing stands apart from the more obvious forms of aim assistance (sticky aim, inflated hitboxes) in a couple of ways:
1. It happens even when the shooter does not have an enemy targeted
2. Its behavior is usually independent of the shooter's choice of weapon
You'll occasionally hear complaints that aim smoothing is too severe in some games. This can actually hamper the player by imposing a limit on how fast they can react and creating a feeling of disconnect between the input controls and the character model's actions. The vast majority of console shooters have a specific smoothing behavior hard-coded into the game and do not offer any settings for adjusting its severity.

### Mouse vs Controller

If you ask why a mouse is superior to a controller for FPS games, the usual answer you'll get is that the wider range of motion of the mouse naturally provides finer control for aiming than an analog stick. While this is certainly part of the equation, I think it glosses over a fundamental difference in how mouse movements and analog stick movements are translated to changes in look direction.

A mouse provides the player with direct control of the angular position of the reticle - displace the mouse by X centimeters and your look direction changes by Y degrees, where Y is proportional to X. It also provides precise control of rotation speed according to how fast the mouse is moved. In contrast, an analog stick affords the player only direct control of angular velocity - deflecting the stick by X degrees calls for a rotation speed of Y degrees per second . It's fairly obvious why analog sticks are interpreted in this way - as the stick is physically attached to the controller, its range of motion is very limited and you can't 'reset' it to a convenient location on the desk after it has been moved too far like you can with a mouse.

Why does any of this matter? I would contend that an input device which converts displacement to reticle speed is inherently more difficult to control (in the sense of supporting both fine aim adjustments and fast twitches) than one that converts displacement to reticle position. Justification for this claim comes from the physics involved, more specifically the integral-derivative relationship between angular position and angular velocity. For example, whereas moving the mouse at constant speed causes the reticle to turn at constant speed, moving the thumbstick at constant speed would cause the reticle to turn at linearly increasing speed. This controller 'hypersensitivity' is tempered by lowering the maximum rotation speed and introducing artificial measures such as aim smoothing to limit the growth in rotation speed over time (acceleration). As a result, players with good control of the sticks have reported a sluggish or unresponsive feel to reticle twitching in many console games.

 † Irrespective of aim acceleration, the relationship between stick deflection angle and rotation speed is usually nonlinear. Basically, once you pass the 'dead zone' the stick becomes increasingly sensitive moving towards the limits of its range. The reason for this behavior might be to give the shooter better fine aiming control. This is a topic in itself which I'll leave for another day.

### Measuring Aim Acceleration

To investigate how aim smoothing is implemented in some of the more popular console FPS titles, we can simulate a basic thumbstick movement and observe the reticle rotation over time. I say simulate because, rather than attempting to manually replicate a predefined stick movement, we can use the controller hack discussed in the previous blog entries to directly synthesize the stick voltage. This approach provides precise control of the aiming signal seen by the console with near perfect repeatability.

What sort of stick movement should be simulated? Preferably something simple and intuitive that does a decent job of exposing the aim smoothing implemented by the game. I chose to use what might be referred to as an 'ideal twitch' - a step function that transitions instantaneously from the default stick voltage to a higher voltage and then remains constant, thus simulating a quick twitch of the stick from 0 degrees (resting position) to X degrees on the horizontal. Of course, in the real world it takes the player a small amount of time to twitch the stick, but I don't think it's so important to mimic this behavior for the purposes of our investigation.

It helps to know what result we're expecting to see with this ideal twitch input. Based on the previous explanation of the analog stick as a device that converts angular displacement to rotation speed, we should, in the absence of aim smoothing, observe an immediate jump in rotation speed from 0 to Y and then the constant speed Y until the input is removed. In other words, the angular velocity of the reticle should track the stick voltage perfectly. In contrast, when aim smoothing is present we expect a more gradual rise in rotation speed from 0 to Y. In both cases the eventual rotation speed Y is governed by our choice of look sensitivity in the game's control settings. The basic relationship is summarized in the plot below .

 ‡ Notice also the instantaneous deceleration of the reticle when the stick is returned to its resting position (just after 1.6 sec on the time axis). This behavior, which allows the player to quickly reverse the reticle direction, has been confirmed for many different FPS games, and it suggests that aim deceleration doesn't warrant any further attention.

The next question is how exactly to measure the angular velocity of the reticle based on what we see from a first person point of view (PoV) on screen? A video capture card can be used to record the turning sequence which can then be played back frame by frame. The basic idea is to estimate the reticle's angular position θ at every frame and then calculate angular velocity ω by numerical differentiation,
where k denotes frame index and T is the time between video frames. One point to keep in mind is that numerical differentiation is quite sensitive to noise, meaning any inaccuracies in our estimates of θ will be amplified in ω.

What's needed is a way to accurately determine the shooter's rotation angle θ over time based on the video data. My approach was to build a video 'template' of known rotation angles by recording a full 360° rotation at a slow, constant speed. This can be accomplished by choosing a low look sensitivity, applying a small increase in voltage to the stick (a slower turn means more frames in the template, i.e., better angular resolution), and analyzing the second rotation in the sequence (because aim smoothing typically wears off during the first rotation). Since the speed of rotation is constant, the resolution of the template can be calculated simply by counting the number of frames for a full rotation. Typically, I set the speed slow enough to obtain a resolution of better than 3° between successive frames.

Once the template has been recorded, it's just a matter of doing 'measurement' recordings with a few different sensitivities and stick voltages - this time looking at the shooter's first rotation because we want the aim acceleration to be captured - and comparing the results to the template. Background scenery in the video makes it easy to identify the two template frames that fall on either side of a given measurement frame, and we can estimate θ by visual interpolation. The three images shown below illustrate how this works. The top image is the 10th frame of a full speed rotation on 3 sensitivity with aim acceleration present (starting from rest). The bottom images are the two nearest template frames, which have known rotation angles of 20.7° and 22.2°. Clearly the measurement frame is closer to the 20.7° template frame, so the shooter's rotation angle can be judged to be about 21.1°. The big white rectangles in the center are just an overlay added by my image processing script to make it easier to judge the angles based on the background scenery.

Black Ops measurement frame

Black Ops template frame (20.7°)

Black Ops template frame (22.2°)

Repeating this process for every frame of the shooter's turn gives a complete record of θ which can then be used to compute the rotation speed ω as explained above. I had considered trying to automate the entire process with more sophisticated image processing code for the template comparisons, but this proved difficult and I ended up falling back to the visual interpolation technique. Here is a short video which summarizes the measurement procedure and shows the frame by frame results for CoD: Black Ops and Halo 4:

That's all for the basics of aim acceleration and how it can be measured. Check out part 2 for a comprehensive analysis and discussion of the aim acceleration characteristics of many well-known console shooters.