Skip to main content

The Perception Window

·540 words·3 mins
Blog

Creating realistic and engaging characters in video games poses a significant challenge due to the varied ways players interact with them. Each player has their own playstyle, whether it involves sneaking up on enemies or engaging in instant combat. Additionally, some players may have brief interactions with certain characters, while others may spend more time delving into their AI intricacies. From the perspective of AI programmers and designers, they meticulously craft every detail of the characters and their environments. However, for players, these elements only come to life when they encounter them. A diligently planned routine for an enemy’s response to player engagement becomes irrelevant if the enemy is defeated with a headshot moments later.

The Player Only Knows so Much #

While certain aspects like emotional states can be effectively conveyed through animations and sounds (e.g., a character crying), players often have limited time to grasp the full context surrounding NPCs. Although a subset of curious players might choose to observe their adversaries before engaging, many others will have fleeting encounters. Therefore, it becomes crucial to align a character’s AI with its purpose in the game and the attention it is likely to receive from players. Excessively adding AI complexity to incidental characters might impress a small portion of the audience, but the majority would perceive it as poor programming.

In AI for Games, Ian Millington provides the following example:

A guard standing in a dark room hears a noise: ‘I’d flick the light switch,’ we think. If the guard doesn’t do that, we might assume they are stupid. […] If we see a guard who has heard a noise suddenly turn away and move slowly in the opposite direction, we assume the AI is faulty. The guard should have moved across the room toward the noise. If we observed them for longer and saw the guard head over to a light switch by the exit, their action would be understandable. Then again, the guard might not flick on the light switch after all, and we might take that as a sign of poor implementation. However, the guard may know that the light is inoperable, or they may have been waiting for a colleague to slip some cigarettes under the door and thought the noise was a predefined signal. If we knew all that, we’d know the action was intelligent after all.

Make Changes in Behavior Clear #

Millington also makes a notable observation: behavioral changes in characters stand out more than the behaviors themselves. When a character fails to exhibit an expected change in behavior, it immediately draws attention and disrupts immersion. Such a scenario can have a detrimental effect on the overall gaming experience, leaving players feeling disconnected and dissatisfied. To avoid this, meticulous attention must be given to ensuring that characters’ AI responds appropriately to contextual triggers and events, enhancing the sense of realism and maintaining immersion throughout the game.

By understanding the diverse ways players approach and interact with characters, designers can make informed decisions about AI behavior, emphasizing the need to create characters that not only feel alive and believable but also adapt convincingly to dynamic gameplay scenarios.

References #

Millington, I. (2019). AI for games (pp. 23–24). Crc Press, Taylor & Francis Group.