Sponsored By

How to create a 'fair' auto-aiming system in a robot shooter

Overhauling the algorithm and the introduction of a single mathematical formula to determine target priority has made our auto-aim settings more transparent and predictable for all players–and to great feedback.

Kirill Sharikov

December 10, 2024

10 Min Read

In the shooter genre, one of the most popular on mobile platforms, speed and reaction time are critical. That said, mobile control schemes differ significantly from traditional keyboard and mouse setups or controllers – and this is where the auto-aim feature proves invaluable.

What is auto-aim? This is a mechanic that alleviates the burden on players because it allows them to concentrate on strategy and tactical decision-making rather than precise finger movements. This is particularly important in multiplayer games, where every second counts; even the slightest delay or missed shot can lead to defeat.

This enhancement not only streamlines gameplay but also broadens the game’s accessibility for a wider audience. But how to implement it in a fair way? In this post, we’ll share how our expertise guided our solution.

I’m Kirill Sharikov, a programmer on the War Robots project. In this article, I’ll explain how auto-aim systems typically function in games and how we implemented this feature in our game.

A survey of auto-aim algorithms

Now, while some “hardcore” players may view auto-aim as a form of “cheating,” nevertheless, it remains an essential feature in both console and mobile games. In fast-paced shooters, aiming can become quite a challenge – highlighting the need for auto-aim systems to be both responsive and intuitive for players.

The concept of aim-assist has its roots in console gaming and has since been adapted for mobile platforms. There are several effective approaches to automatic target selection systems; let’s discuss some of them:

1. Magnetic Aiming: This technique allows the crosshair to be automatically attracted to the nearest target. When an enemy is sufficiently close to the center of the screen, the reticle subtly adjusts to “stick” to the target, enhancing accuracy without demanding precise control.

2. Prediction: This method is utilized for targeting moving enemies; it factors in the current speed and direction of the target to anticipate its future position, allowing players to aim effectively even while the enemy is in motion.

3. Area Cursor Expansion: This approach modifies the size of the hit registration area for the target (hitbox). By enlarging this area, a hit is registered even if the crosshair is close to, but not directly on, the target. In more advanced implementations, the size of this area may dynamically adjust based on contextual factors — such as increasing when the target moves rapidly or is further away.

4. Sticky Targeting: This method allows the crosshair to maintain contact with the target after the initial aim. When a player aims at an enemy, "sticky mode" is activated, ensuring the crosshair stays on the target even if it is slightly moved. The crosshair will remain attracted to the target as long as it is within a defined radius.

5. Visual Aids: Visual effects are implemented to assist players in aiming. These can include various methods to highlight enemies and on-screen indicators that show the direction of the nearest enemy, enhancing situational awareness.

6. Target Lock: By pressing a designated button, players can lock the crosshair onto a specific target, making it easier to track. Once locked, the crosshair automatically follows the target's movements, allowing for smoother aiming. Players retain control over target acquisition and can "unstick" the crosshair at any time, granting the flexibility to aim in any direction.

The aiming system in War Robots

For War Robots, we chose to integrate multiple approaches to create an aiming system that accommodates players of all skill levels.

Our overarching concept is that players aim at the entire enemy robot rather than a specific point. This design choice not only enhances the user interface but also immerses players in the action, giving the impression that the combat robot's guidance systems are actively engaged.

image02.jpg

In the first iteration, we displayed a large frame on the screen for target selection, prioritizing the closest targets to the player. While this approach was straightforward, it lacked intuitiveness, as our game features robots with diverse combat strategies—such as tanks and snipers—making the mere selection of the nearest enemy inadequate for all robot types.

To enhance the aiming experience, we restructured the screen into five distinct vertical zones: two red, two yellow, and one green. Targets were only selected from enemies located in the green zone. If multiple enemies occupied this zone, the closest one to the player was prioritized. Once a target was selected, it remained locked as long as it stayed within the green and yellow zones, provided there were no higher-priority targets in the green zone. If the target moved into the red zones, the lock on that target would be released.

This method was further supported by the robots themselves, as each robot can slightly adjust its turret angle to track targets, creating a more dynamic and engaging aiming experience.

image03.jpg

We later introduced the capability to lock onto a target by pressing a designated button. This same button allowed players to manually select another target within the green and yellow zones.

Despite some player dissatisfaction with this aiming system, we maintained this approach for an extended period for several reasons. First and foremost, the adage "if it works, don’t change it" held true; there was always the risk that a new system could be worse than the existing one, potentially leading to negative feedback. Additionally, concerns about the feasibility of any proposed changes were prevalent, as discontent with the current system largely came from highly experienced players who favored manual aiming.

The complexity and lack of clarity in the auto-aim settings also played a role here. Players could only adjust the firing angles, which in turn influenced the size of the aiming zones through complex transformations. Consequently, the configuration relied heavily on personal intuition, making the results subjective.

As a result, we struggled for a long time to determine how to evolve this system in a way that would satisfy both game designers and players.

Transitioning to the utility system

Several years passed, and at least once a year, some developer attempted to modify the aiming system in the game. One day, during a technical day (a special, irregular event at our studio dedicated to implementing employee ideas) a prototype of a new aiming system was created. This new prototype rejected previous developments in favor of a completely novel approach based on the Utility system.

We had previously applied the Utility concept to configure the behavior of bots in PvE mode, and it had proven successful and well-received by the game designers. This was primarily because it enabled us to define action priorities for the bots using Excel spreadsheets — after all, game designers tend to prefer working with tables to implement their ideas. Building on that success, we decided to leverage the Utility approach for automatic target selection.

The Utility method is straightforward: it calculates an overall coefficient for each target based on various parameters. The prototype initially employed the same criteria as the previous system, including the distance to the target and its proximity to the crosshair. However, the enhanced usability of the new approach allowed game designers to fine-tune these coefficients, resulting in a targeting system that most players who tested the prototype found enjoyable.

This concept progressed into full development, with an expanded set of criteria to enhance the system's flexibility. Targets were now selected based on a combination of the following parameters:

  • Distance to target

  • Target HP

  • Distance from crosshair to target

  • Whether target is behind cover

  • How many shots have been fired at this target

The final coefficient enabled the implementation and adjustment of the previously mentioned "sticky" mode, allowing the crosshair to remain fixed on a target during intense fire. As a result, the aim would not inadvertently shift to another target, even if it suddenly moved closer or had a higher priority for any reason. This "sticking" coefficient could also be fine-tuned to enhance the targeting experience.

This new approach significantly simplified the system for both developers and game designers. For developers, it came down to calculating a single formula for each target within the visibility zone, represented as follows:

Utility =(〖Aim〗_U∙〖Aim〗_Factor)∙(〖Distance〗_U∙〖Distance〗_Factor)∙(〖Hp〗_U∙〖Hp〗_Factor)∙(〖Cover〗_U∙〖Cover〗_Factor)∙(〖Hit〗_U∙〖Hit〗_Factor)

In this formula, each U value ranges from 0 to 1, and is multiplied by the corresponding Factor coefficient set by the game designers. With this framework, designers gained greater control over the weighting of various parameters, allowing them to adjust the priority of specific criteria during automatic target selection.

image04.png

This is how aiming parameter settings have evolved for game designers. The Utility approach enables designers to immediately see how each parameter and its respective weight influence the selection of the current target. In the new system, they could apply mathematical principles to target selection, rather than relying on abstract adjustments to aiming zone size and subjective impressions, as was done previously.

Additionally, flexible automatic aiming settings became available to players. In the new system, each player can enable their preferred target selection criteria within the game settings and adjust them to suit their individual combat style.

image05.png

For instance, players who favor a sniper playstyle can now disable the distance parameter and prioritize target selection based on the enemy’s health, choosing targets with the least amount of health first. Conversely, aggressive players wielding shotguns can enable distance settings to prioritize closer targets.

The new system also enhances the experience for players who prefer manual target selection. They can now specify the algorithm for switching targets during manual aim, with options to prioritize targets based on:

  • Decreasing or increasing distance to the target

  • Decreasing or increasing the target's remaining health

These innovations have made the aiming system more flexible and intuitive for players, greatly enhancing overall gameplay.

Playtesting and player feedback

No metric can capture the true sentiments of players, but following the main development phase, there was a lengthy period dedicated to refining the new system based on feedback from participants in the closed testing sessions.

Game designers assigned various weights, conducted internal playtests, and gathered insights from the developers involved in the testing. Feedback was collected after several matches, and if the majority of playtest participants expressed satisfaction with the aiming response, that version of the game was released for broader testing.

The designers meticulously analyzed reviews and studied match analytics to identify which settings were most popular. Based on this data, adjustments were made to the coefficients, and the testing cycle was repeated multiple times until playtest participants confirmed that the new system performed effectively and was preferred over the old one.

However, rolling out the new system to all players at once posed significant risks, given that aiming is a crucial aspect of gameplay. To mitigate this, we decided to introduce the new system as an optional feature that players could enable in the game settings. This approach aimed to prevent experienced players from reacting negatively to changes in the familiar gameplay dynamics. Analytics revealed that only 18% of players chose to activate the new system, indicating that many were hesitant to experiment.

While it cannot be definitively said that players preferred the new system over the previous one, the feedback was overwhelmingly positive. Among those who tested the innovations, 80% chose not to revert to the old system. Additionally, our community managers observed a significant decrease in complaints related to the aiming system. Players particularly appreciated the setting that accounts for a target's line of sight, an important feature given that many maps allow robots to take cover.

It’s worth noting that most experienced players, who have been engaged with War Robots for a long time, tend to favor manual target selection. As a result, the new system had a lesser impact on their gameplay. Nevertheless, even these seasoned players recognized the benefits of customizing the algorithm for switching between targets.

In retrospect, despite the challenges and risks associated with altering such a critical aspect of any shooter — namely, the aiming system — the implementation of the new Utility-based approach can be regarded as a success. The player feedback has provided valuable insights for further improvements and refinements of the aiming system. With the complete overhaul of the algorithm and the introduction of a single mathematical formula for determining target priority, the settings have become more transparent and predictable for all players.

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like