Artificial Intelligence and Behavior Patterns in Unreal Engine
Halldór Snær Kristjánsson goes over the process of creating video games with motion capture technology in the Unreal Engine software.
At Myrkur Games, a diverse group of people are working on creating a story-driven adventure video game. The game's creation involves using both relatively simple programs like Final Draft and Photoshop, as well as complex control software that runs motion capture technology. The production is actually similar to filmmaking, and the company's premises in Grandi house a large, state-of-the-art recording studio where actors wear motion-capture suits and create digital doubles.
Halldór Snær Kristjánsson, CEO of Myrkur Games, discusses the software used in the production in detail in this week's educational post. “The main software we use for the video game's production is Unreal Engine. Unreal Engine is a highly advanced game engine, specifically designed for developing video games and virtual experiences. The engine is one of the most powerful in its field and is used by the world's leading game developers. It is the fundamental foundation that allows Myrkur to develop a video game of such a large scope. In addition to Unreal Engine, the team uses a large number of programs to build the game. They are as varied as they are many, but each program supports the game's production in different ways. The game's development involves many diverse fields such as animation, character art, programming, environmental art, costume art, sound, writing, and so on. Each field utilizes a range of programs in its daily work, from Final Draft and Photoshop to complex control software that runs motion capture technology and programs that support the creation of 3D models.
Software and hardware development has advanced significantly in recent years, and at the same time, access to them has greatly increased. All of this comes together to allow video game developers to tackle larger and more extensive projects with smaller teams.”
What about designing the basic and behavioral patterns of characters?
“Artificial intelligence and behavioral patterns are developed within Unreal Engine at our company, which offers powerful solutions for AI in video games that can be extensively built upon.”
How does the AI workflow function in Unreal Engine?
“Artificial intelligence is a broad concept, and its use varies greatly between games. For Myrkur Games' game, the AI is mainly used to control the characters found within the game world. Our main goal is to enhance the player's immersion in the virtual world by creating a realistic experience with believable character behavior. The characters in the game world have different roles and values, and their behavior is therefore varied to reflect these different roles. In a simple example, guards or enemies have a different behavioral pattern than ordinary townspeople. Likewise, it must be kept in mind that the player's actions and dialogues can affect the behavior of the world's characters.
Decision/Behavior Trees
Fundamentally, each character's behavior is based on decision/behavior trees. These decision trees contain all possible actions that each character can perform, but they also keep track of external factors and variables, such as location, the status of other objects in the environment, and the player's actions. When behavior trees are created, one must consider variables that affect the character's decision, what the character's tasks are, and what the priority of those tasks should be. It is also necessary to consider how characters receive information, e.g., through sight or hearing. The character also needs to be aware of where other characters in the world are and how they should react to their actions. All of this is essentially implemented with software and decision trees, which form the game's artificial intelligence. Based on all this information, the character can then finally make its own decisions based on its own priorities and conditions.” A screenshot of a computer Description automatically generated with medium confidence Decision tree - Image taken from the Unreal Engine information database.
<embed embedtype="image" format="fullwidth" id="2127"/>
How do you design behavior and town life?
“The design of town life within video games largely depends on how accurate a simulation of reality is being recreated. What is important in the implementation is to understand what purpose the AI serves in the game. In many cases, it may simply be enough to approximate reality roughly, and it is therefore unnecessary to implement everything a person might possibly do or to account for all possible situations. This is because often the player is not going to spend enough time with these characters within the game.