Gamasutra is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Gamasutra: The Art & Business of Making Gamesspacer
Terrain Reasoning for 3D Action Games
arrowPress Releases
October 28, 2021
Games Press
View All     RSS
If you enjoy reading this site, you might also want to check out these UBM Tech sites:


Terrain Reasoning for 3D Action Games

September 12, 2001 Article Start Page 1 of 4 Next

Terrain reasoning is the AI capability to take into account terrain in its planning, decisions, actions and communication. Terrain reasoning is a necessity if both AI and terrain play an important role in the game -- as is often is the case in 3D action games.

Level designers spend weeks designing a challenging game world with well-thought out battle arenas, multiple access routes, risky approaches to highly valued power-ups, defensive strongholds, and neutral zones.

However, the traditional action game AI was unaware of all the thoughts, efforts and design that went into the level. Instead, it ran around almost blind, via shortest paths and sometimes guided by a few static hints from the level designer:"Don't ask me, I only work here!"

This article presents terrain reasoning based on the waypoint graph typically present in 3D action games. It discusses terrain reasoning concepts, and how the waypoint graph can be reasoned about. The paper discusses and demonstrates the relation between tactics and terrain. A case-study shows how to develop off-line and in-game reasoning to pick good sniping spots, and how to use game-play feedback to create adaptive AI with tactical understanding of the terrain.

A short threat prediction example demonstrates one of other ways to reason about the terrain. The paper also addresses the major issues in implementing such a terrain reasoning system.

Why Terrain Reasoning?

Today's action games offer plenty of situations where better AI understanding of the terrain would be valuable to the gamer and level designer. For example:

  • Recognizing key terrain features and communicating about them.The player issues a "provide suppressive fire" command while pointing to a door in a distant building. Typically, it is not as obvious to the AI as it is to the player that a door is pointed to rather than the wall next to it. But the player expects to hear the AI confirm his order: "roger, will provide fire on that door".
  • Distinguishing between good and bad locations. All locations are not created equal. Some locations are great to ambush other actors, whereas other locations are not. An AI actor who picks the right location for an action simply is more convincing
  • Interpreting location based performance. After being lured into the same narrow tunnel to receive a rocket for the 3rd time in a row, it would be great if the AI would recognize the tunnel as a bad place to be. The AI should adapt its tactics accordingly, instead of trying to dodge the rocket without the space to do so.
  • Automating part of the level annotation. The level designer favorite job probably isn't manually editing dozens of waypoints to tell the AI "camp here", "avoid this location", "here's some cover". An AI capable of automatically annotating the level itself will save the level designer time. And AI provided feedback on its interpretation of the terrain might be welcome as well. Automated AI interpretation not only is useful for the professional level designer, but even more for the amateur level designer who is less familiar with the needs of the AI.
  • Including the terrain in tactical considerations. Few things are as exciting as engaging a squad of AI actors who coordinate their actions, and alternate suppression fire with grenade lobbing. Part of that excitement disappears if the same squad applies those same tactics at a less suitable location: the AI should understand that attacking from, for example, an elevator is different than from a warehouse full of crates.
Terrain reasoning may be an important ingredient to address the issues, but it cannot do so without enhancements in other parts of the AI, such as the planner, state machines, combat rules, etc. These other parts of the AI have been receiving plenty of attention in literature.

Ingredients and Concepts

Terrain reasoning AI subsystem consists of the following components:
  • terrain representation; and
  • functions to construct, query and manipulate that terrain representation.

The amount of terrain in an action game makes it infeasible to efficiently handle the terrain in raw geometry format, or by means of a rule bases or neural nets: both the size and the geometric detail present in a level prevent this.

For those reasons, terrain reasoning should be addressed with custom solutions, tuned for the specific AI needs and level characteristics of the game.

A popular and custom means to describe terrain are waypoints (and similar concepts such as cells or grids - see [Reece], [Snook]). Waypoints represent the subset of the terrain accessible to the player and AI. The connections between these waypoints denote viable movement. And the graph created by the waypoints and their inter-connections expresses the valid paths.

Often, these waypoints are annotated with the presence of nearby power ups. Sometimes, the waypoints are part of more abstract concepts like areas and portals. Thus, waypoints are a handy and versatile terrain representation. Nevertheless, the AI typically ignores to reason about them (except for the occasional path finding).

The remainder of this paper discusses how to reason about terrain based on the waypoint graph. While the ideas result from developing tactical squad and individual AI for tactical action game, the concepts apply to a wide range of action games.

Article Start Page 1 of 4 Next

Related Jobs

Sanzaru Games
Sanzaru Games — Foster City, California, United States

Tools Programmer
Monomi Park
Monomi Park — San Mateo, California, United States

Senior Game Engineer
Iron Galaxy Studios
Iron Galaxy Studios — Chicago, Illinois, United States

Senior Software Engineer
Disbelief — Cambridge, Massachusetts, United States

Junior Programmer

Loading Comments

loader image