Applicability of Weapons
Certain weapons are suited to different situations. Although ubiquitous weapons have been developed to handle many of these combat situations, it's often the case that different weapons perform better in particular situations. As the saying goes, an infinite number of monkeys with rocket launchers will have more success in some cases. This is because of aspects of the design combining implicitly via the game simulation. Weapons are therefore variably effective, mostly regardless of the player's abilities.
Situation of Participants
The disposition of players in space is one of the most important factors on the applicability of a weapon. Clearly, the relative position of the enemy affects the efficiency of any particular weapon (depending on its precision).
When the battle is up close and personal, a weapon requiring high precision with a low firing rate will not prove too efficient. Conversely, a weapon that can spit out bullets at a fast rate will have the advantage, even if it is less accurate.
For long distances, projectile weapons with high damage may be preferred, rather than a multitude of smaller ones. Fast-traveling projectiles may also have an advantage, because they are generally more accurate on moving targets (reaching the destination quicker).
Figure 22.1 shows the effectiveness of the super shotgun and railgun. The spread of the super shotgun makes it suitable for very close fights, whereas the railgun is equally effective at a distance.
Figure 22.1. Demonstrating the effectiveness of the super shotgun and the railgun at different distances.
These are two of many examples showing the importance of distance—and the position generally—in the equation. To a lesser extent, factors such as relative height and orientation to the target also affect the effectiveness of a weapon.
The dynamic nature of the fight can also have an impact on the effectiveness of a weapon. This includes the relative movement of the players as well as the evolution of the fight over time. Stages of engagement (for instance, observation, opening fire, retaliation, and full exchanges) and changes in dominance are some examples.
When the player is trying to ambush another, the most effective weapon is a powerful one—capable of delivering a lethal blow without the opponent being able to react. On the other hand, when a player is running around expecting to be ambushed, or suddenly ending up face to face with the enemy, a weapon allowing fast retaliation will be instantly effective.
When a player is fleeing, a weapon with rapid fire ensures that pressure is kept on the attacker. The person playing the predator will want to finish off the prey as soon as possible using big and clumsy weapons, although this example depends more on player style.
Player and Enemy Status
Different targets may be variably receptive to weapons. For example, an electromagnetic shield may successfully block electromagnetic pulses, but have no protective effect against the good old axe. To this extent, the effectiveness of a weapon depends on the state of the opponent's weapon, and how they are equipped to reduce damage.
On the other hand, personal modifiers can enhance the damage inflicted. This isn't so much applicable in real life, but things such as quad-damage (the enemy suffers four times the damage) and haste (the rate of fire is accelerated) can have a dramatic impact on the gameplay. Selecting a powerful weapon and one with rapid fire (respectively) will generally pay off.
In some cases, the applicability of weapons is independent from power-ups, but instead influenced by other state variables. For example, a player with low health will be more desperate and keen to inflict much damage in the short term. Conversely, a well-armed and protected player may have more freedom of choice, and the luxury to take a less-effective weapon (but with higher consistency).
Finally, other little details about the state have an important effect on the benefit of changing weapons. The warning of low ammunition is a strong factor, because changing weapons before the fight will save valuable firing time during the fight. Similarly, if a player has just changed weapons, even if there are compelling reasons to switch again, the benefits will be lessened; more time will pass before a shot can be fired.
The environment itself influences the effectiveness of a weapon. Because weapon-selection behavior operates on a broader scale than shooting skills, the layout of the environment is much more important to them. Specifically, the AI needs to take into account the effect of the environment on itself, the enemy, and the weapons—in the medium-term future.
Factors such as the openness of the terrain or its closed nature will have a huge effect on the value of a weapon. These characteristics of indoor and outdoor environments invite different weapons.
For example, some obstacles may impede the trajectory of projectiles, making them less effective. On the other hand, the layout of the terrain can also constrain the splash damage and cause the player to suffer more harm.
Secondary properties of the world such as contraptions (for instance, ladders and platforms) or detail (for instance, foliage or cluttering objects) also determine how efficient weapons are. As game players, we can understand these properties of the environment. We'll have to make sure the AI can acquire or learn this information.
Figure 22.2 shows an example. Note in the figure that players standing near walls are more likely to get hit indirectly. The floor can also be a risk for the same reason, but is not taken into account in these top-down views.
Of all the different weapon properties discussed, some can be identified as weaknesses (for instance, slow to reload, slow projectile). It's safe to say that no weapon is perfect. For entertainment value, the design emphasizes the different properties of the weapons (for instance, speed or power). This implies that strengths and weaknesses are also enhanced.
An implicit consequence of this is weapon balance. Vulnerabilities can be emphasized by complementary properties of another weapon. This implies one weapon will be particularly suited to counter another.
So far, the criteria for the applicability of weapons have been implicit consequences of the design. However, the players themselves have an important role in determining the effectiveness of a weapon. This is the link with the previous part, focusing on weapon skill.
A player with bad weapon skills will not have the option of using it efficiently. On the other hand, good shooting abilities will open up additional options for the weapon selection. All the other conditions will kick in to determine the effectiveness of the weapons (for instance, restrictions of the environment, state of the player, and so on).