AI Design – Assessing the needs of AI in a shooter game (Initial Stage)

The needs of an AI system, or systems, in any genre of game, differs greatly depending on the needs of the genre.

For example, the needs of the Civilization series of games requires entirely different AI logic than that of League of Legends, for example. However, games that fall within the same genre also have different needs specific to their unique mechanics. Designing appropriate AI logic is therefore also a key part of designing a good game. In this post, the needs of appropriate AI systems ready for implementation in my dissertation project, the Rhythm Arena, will be assessed in order to determine the relevancy of various AI logic methods that will be covered in later posts.

Real-Time Movement

It should go without saying that if a game has enemies, they tend to need to move. Be it the slow, side-wards movement seen in space Invaders or the fast hordes of Left 4 Dead, they all move in the world space. The aliens in Space Inavders however only move towards the bottom of the screen, whereas the zombies move towards the player position. Both pose a threat in their own ways but perform very differently. So how should AI in an arena perform?

Firstly, they will need to able to traverse their environment. This could involve multiple floors in an arena or around obstacles, for example. An AI should also be able to assess it’s current position and decide, strategically, on the best course of action to take in the foreseeable future i.e. if there is cover and it is on low health, find that cover and use it properly. Therefore, some method of pathfinding is definitely needed to account for this problem.

Attacking Mechanics

Enemies might be able to move about the environment but that alone poses no threat to the player in this environment, this won’t be a horror game. So enemies need to be able to attack the player in some capacity, such as using a gun. Therefore, a suitable enemy needs to be able to assess its current state and determine if they can attack the player. This should account for:

  • The current ammo they might hold (enemies usually have infinite ammo so this may not be essential)
  • Current ammo in their magazine before reloading
  • If they can see the player
  • If in range to attack
  • What method of attack should be chosen? Should it be aggressive or taken from a defensive position, such as behind cover?

Group Mentality

Enemies will not necessarily be brought in alone to face the player. Usually, a group of them will either spawn or exist at any one time within the environment. They will also, within the scope of meeting dissertation project deadlines, be of a similar or the the same type of enemy. So they should probably all act the same. Making them work in exactly the same way however will cause problems, dependent on the conditions set up for actions to be performed. However, making each entity work alone would also have problems of its own as they won’t take into account their environment effectively. Each entity can therefore work independently but also as part of a unit. By implementing weighting based on other entities in the area, akin to a morale system, a more believable enemy can be created. This section has been covered in more detail on the Week Two article on this website.

Self-Assessment

So the logic has been implemented to accommodate for the three elements above. Each entity can move, shoot and co-ordinate to some extent with other similarly aligned entities. Now it needs to be able to determine what the best course of action for itself is at any given point. Are other entities able to attack or suppress the player behind cover but the entity in question needs to find health, reload or find suitable cover? The logic should therefore be able to override any group mentality selfishly and allow that single unit to perform the necessary step to staying a threat to the player. By implementing self-assessment protocol into each entity, this behaviour can be achieved.

Takeaway Thoughts

At a basic level, the four elements presented above give the groundwork for creating effective AI governance at both the group and individual scale within the confines of a shooter game. As the aspects of a shooter game transfer over to an arena based one, with the added constraint of a more enclosed space, these elements are good enough for framework. In creating the more nuanced aspects, however, such as making the AI aware of the music currently playing, this will involve more specific implementation. This topic will be covered in a later post once the design has been implemented effectively.

Leave a comment