Технічна інженерія (Nov 2023)
Building game intelligence with the State pattern in the Unity game engine
Abstract
Computer games have become a part of everyone's life today. They occupy a large part of the entertainment industry. The gaming industry is growing and evolving every day thanks to new technologies, platforms, and trends. For example, esports has become a popular way to spend leisure time. Game broadcasts on platforms such as Twitch and YouTube have become very popular. A large number of esports competitions involve computer-controlled players (bots). The game intelligence of bots affects the level of complexity and strategies of the game. It can be designed for bots of different skill levels, from beginners to very highly skilled opponents. If game intelligence provides smart opponents, the game becomes more challenging and interesting. Players can feel the impact of their decisions as they see how the game intelligence of bots responds to their actions. An example is the game «Dark Souls», where intelligent and merciless enemies create an extremely challenging gaming experience. Game intelligence can also control the creation of the game's plot and dialogues. Intelligent bots can create intriguing scenes and decisions for players that affect the plot. An example of such bots can be seen in the game The Witcher 3: Wild Hunt, where game intelligence influences the plot development. The purpose of the paper is to study the use of game intelligence and its construction as a basis for further implementation of the logic of game objects. Game intelligence is implemented in the C# programming language, taking into account the features of the Unity game engine and object-oriented design methods. It can be used by programmers of different levels and will remain relevant and easy to use at different stages of product development.
Keywords