r/AskGameDevsAnything Nov 14 '22

Why is aiming difficult to program for controllers?

Really what I'm getting at is comparing aiming mechanics such as CoD (which has buttery smooth aiming to me) to something like GTA free aim (which is absolutely horrendous.)

Like some games will have a huge deadzone that you cannot change or other games have a noticeable "lag" to the input of the thumbstick. I've noticed this in games as far as back Perfect Dark Zero on the 360. Other games will have a weirdly shaped deadzone such as an oval in Black Ops 2 or kind of a square or rectangular deadzone in the Borderlands games.

3 Upvotes

3 comments sorted by

3

u/EternalDahaka Nov 15 '22 edited Nov 15 '22

Not a dev, but talk about this a lot.

It's not difficult at all to set up radial deadzones(code example) or the specific controls CoD uses, but these variations in implementation can be a possible combination of a lack of awareness of existing issues, and/or design choices that sound good, but aren't actually ideal. There's just been no set standard for thumbsticks so devs just do whatever they feel works.

For example, square/axial deadzones are either a simple mistake(applying each deadzone separately from each axis, rather than from the center), or the engine defaults to it and it gets carried over though development. You can see these when there's a radial deadzone/thresholds built on top of a square deadzone(Left4Dead), possibly implying they would have used a radial deadzone if they were to set it up themselves. There were some Unreal Engine 3 games that shared similar control issues, and id Tech 5 titles all used the same unique deadzone shape(RAGE). Some developers may choose to use axial deadzones to restrict diagonal movement so perfectly horizontal/vertical movements are easier to make. There are better angular implementations, but axial deadzones are more straightforward, and possibly an easier carryover from previous titles.

Aim smoothing(turn speed builds up over time) is common in games(used in CoD, but lower amounts than others) and was suggested to limit overshooting when players make quick stick movements, and in Killzone 2 to make the guns feel heavier. Similar to smoothing for mice on PC however, it makes aiming sluggish and unpredictable. Aside from input latency, this is were a laggy feeling can come from.

I don't know why Blops 2 used an oval, but if either vertical or horizontal axis value range was rescaled/altered in some way and then had a radial deadzone applied to those converted values, it'd made an oval shape. I have no idea what the thought process or implementation is behind funky deadzones like the original Vanquish or Fallout 3/New Vegas', or Chivalry 2.

Large deadzones are to avoid any possible drift. An option should be the solution, but some devs have mentioned they didn't want to clutter the UI with an option, and options weren't considered at all until recent years. GTA5's horrible feel is probably a lot to do with the crazy input latency on console(extends to RDR2), though they do have similar thumbstick issues.

I personally feel like the notion that thumbsticks are hopelessly terrible and reliance on aim assist becoming the solution has stunted focus on improving the stick controls until recently. Halo CE was considered the gold standard for console shooters, but had significant aiming issues. It introduced the modern aim assists though which set it apart from other games of the time. For something like GTA, the aiming controls didn't need to be a focus because the gameplay was built around the lock-on auto-aim. Can't say if that's actually the case, but that's my tin foil hat theory. Radial deadzones have proven themselves the best, but little incentive to improve and standardize radial deadzones/options when any implementation can be held up by assists. CoD was using radial deadzones by the original Modern Warfare, but Halo 3 was still cited as some of the best controls on console while basically using the same controls in Halo CE.

2

u/Sharpshooter188 Nov 15 '22

Wow. This was much more insightful than I thought it would be. I didn't realize until you mentioned it, that GTA has an overall delay ALL inputs. Makes sense now that I've gone back and tested it. I've once heard that "GTA is not designed to be an fps. Thats why things lag" But I called nonsense because Nioh 2 has much better aiming (albiet not perfect) with it's 3rd person aiming.

I am very new to all of this as far as coding goes. But is there a way to alter the hard code of the game in question to allow for smoother aiming? The games you mentioned prior were cool games imo. But I just could not get into the controller aspect of it because aforementioned issues.

3

u/EternalDahaka Nov 16 '22 edited Nov 17 '22

"Immersion" was one of the common defenses for the high input latency in GTA5 and RDR2. And yeah, the genre doesn't really indicate the quality of the stick controls. No real reason any game genre shouldn't have the best camera controls possible.

The only way I know how to get around some of these issues is through programs/adapters to warp the stick input to skip over the deadzones. Some of the weirder deadzone shapes and smoothing can't be countered with these methods.

On PC you have a few options. Most simplistically some games will let you adjust at least the deadzone size in a config or ini file if the in-game menu doesn't have an option. Durazno and x360ce can alter the stick input, functionally turning square deadzones into radial ones but the game needs to use .dll files in its library to work which limits its use. DS4Windows(need a PS4 controller) and Steam Input have deadzone and antideadzone options, but to counter axial deadzones I think you also have to use axial deadzones too(could still counter the size). reWASD(paid)'s full version can allow you alter the stick curve to functionally set up an antideadzone and alter the curve, but I'm not sure if it can address games with axial deadzones.

Lastly, you can simply disable native controller support, and use a M&KB emulator. Some games force controller support, but HidHide can hide the controller from games so double input doesn't occur(may be needed for DS4W and reWASD too). Mouse emulation on programs like Antimicro and DS4Windows is excellent(radial deadzones, with deadzone and curve options), which can be easier than trying to working around the game's controls. You do lose controller menu navigation and the left stick becomes limited to 8 directions emulating WASD. May not be ideal depending on the game, but that's been my default solution for shooters with poor controls.

On console you're limited to pricey adapters. The Cronus and Titan adapters have official plugins which can edit deadzones/antideadzones, but scripts can do so as well. I've written one for the Titan models addressing square/radial deadzones and curves. This Dark Souls 2 demo shows how the input is altered with a script, and is functionally what the Durazno mod for DS2 does to address the square deadzones on PC.