Game Development and AI: How Neural Networks Change the Rules of the Game

Artificial intelligence is confidently entering the world of game development, becoming an important tool for optimizing creative and technical processes. From generating graphics and 3D models to creating scripts and voiceovers, AI is already changing the approach to game development. But is it really capable of completely replacing developers, or will it remain just an advanced assistant? In this article, we will look at various aspects of AI application in the industry, its impact on the future of video games, and even consider the world's first neural network game engine!

The Role of AI in Game Development

Game developers strive to create a unique and unforgettable gaming experience for players, which is achieved through a combination of various game elements such as graphics, audio accompaniment, gameplay, narrative, quests, and content. In this regard, artificial intelligence becomes a powerful tool that helps game developers manage the growing complexity of game dynamics.

The popularity of AI in games also has significant business advantages. The gaming industry is one of the most profitable sectors, and its market value is expected to reach $314 billion by 2026. As a result, funding for AI-based game development is growing worldwide, opening up new opportunities for creating innovative and profitable projects.

Art Generation: AI as an Artist

Artificial intelligence, especially models like Stable Diffusion, is actively used for generating art design. Some developers rely on AI to create game assets. For example, you can take a ready-made image, give the AI an appropriate request, and based on this data, it will transform the picture, creating a version suitable for the game's setting. This significantly speeds up the process of creating concepts and illustrations, which is especially valuable at the prototyping stage.


Image of a game character created using a neural network.

Procedural Generation

The generation of game levels is also known as procedural content generation (PCG). This is a set of methods that use advanced artificial intelligence algorithms to generate open-world environments, new game levels, and many other game aspects. It is one of the most promising applications of artificial intelligence in game design. Open-world games are among the most popular today. In them, players can explore vast landscapes. Creating such games takes a lot of time both in terms of design and development. But artificial intelligence algorithms can create and optimize new landscapes depending on the state of the game.

For example, No Man's Sky is an AI-based game with an infinite number of new planets that are generated in real-time as you play.


Graphics of the game world improved using AI.

3D Graphics and Neural Networks: NeRF and Model Generation

Although AI does not always work successfully with three-dimensional graphics, technologies are emerging that can transform this aspect of development. NeRF (Neural Radiance Fields) is one such technology that allows synthesizing images of objects based on neural networks. This opens up prospects for using AI in real-time visualization and content generation, although the technology is still not without limitations.


Battle scene in the game where AI controls the opponents.

An example is Sloyd - a platform for generating 3D models based on a text request, which can already create simple objects and architectural elements, but its capabilities are still limited: it cannot generate complex characters or detailed animations.


Game interface with elements created by a neural network.

Narrative and Scripts: AI as a Storyteller

Using AI to write scripts is a controversial issue. For example, ChatGPT can generate stories for games, but there is a high risk of getting a plot that turns out to be similar to an existing one. AI does an excellent job with brainstorming and helps developers expand ideas, but relying on it to write a full-fledged script is not worth it - it is better to preserve the creative uniqueness inherent to humans.

AI Dungeon 2 is one of the most famous examples of such an application. The game uses a modern open-source text generation system created by OpenAI and trained on Choose Your Own Adventure books.

AI for NPCs

Although this has not yet become a widespread practice, the idea of creating NPCs that can interact with the player using AI looks extremely promising. Imagine a character capable of having a dialogue with the player in real time, adapting to their responses and behavior. This could change the approach to creating narrative games and simulations.

For example, SEED (EA) trains NPC characters by imitating the best players. This approach will significantly reduce the time for NPC development, as hard coding their behavior is a tedious and long process.

Six years ago, Electronic Arts released a video "Experimental Self-Learning AI in Battlefield 1", where they showed how the EA Search for Extraordinary Experiences Division (SEED) created a self-learning AI agent that taught itself to play Battlefield 1 multiplayer from scratch.


Game characters generated by AI in real-time.

Decision Trees with AI

Decision trees (DT, Decision trees) are supervised learning models that can be trained for classification and regression. They are one of the most basic machine learning methods for game development and allow predicting the value of the variable of interest by learning simple decision-making rules derived from the data features.

Decision trees are quite easy to understand, and their results can be easily interpreted. Tree visualization methods are also very advanced. The developed models are known as white-box models and can be verified using various statistical tests.

In game development with artificial intelligence, decision trees are used to describe choices and consequences (predicting actions). Most modern games use DTs, primarily those based on storytelling. In one such case, decision trees can give players an idea of what the future will look like depending on their choices.


Game development process using AI tools.

Balancing Game Difficulty with AI

The main advantage of artificial intelligence algorithms is their ability to model complex systems. Game developers are constantly trying to create more immersive and realistic games. However, modeling the real world is a complex task. Artificial intelligence algorithms can predict the future consequences of gamers' actions and even model things like weather and emotions to balance game difficulty.

A real example of such an application is the team mode in FIFA. FIFA automatically calculates the team spirit score based on the individual characteristics of the football team players. Team morale fluctuates from low to high depending on game events (losing the ball, timely passing, etc.). Thus, teams with better players can lose matches against weaker teams due to their morale. Thus, AI can be used to create an additional level of difficulty.


Game map created using neural network algorithms.

Will there be fully neural network game engines in the future?

The development of AI is moving towards the creation of fully automated game engines. For example, the GameNGen technology, based on the Stable Diffusion model, allows creating environment, interactions, and graphics in real-time. And although this is still more of an experiment than a practical solution, the potential of such technologies is enormous.

What you see in the screenshot is not gameplay from the classic first-person shooter Doom 1993, but a 2024 game created using GameNGen, the world's first fully neural network game engine.


Dialogue scene in the game where AI generates character lines.

The game environment, object collisions, and graphics are fully simulated in real-time at 20 frames per second, and not a single line of code was written to develop this level.

GameNGen is based on Stable Diffusion, which is trained to predict the next frame based on a sequence of previous frames and actions. Another important component of the architecture is the reinforcement learning agent, which is trained to play the game and record itself as an artificial Twitch streamer.


Game character animated using AI.

However, during development, they encountered a problem with auto regressive drift, where the quality of gameplay starts to deteriorate over time. The model has a limited context window of about 3 seconds or 60 frames, but in a game like Doom, that's all you need.

The question arises, does this make game developers unnecessary? The answer is, of course, no, this game barely works, and the technology currently has no practical application. But in the foreseeable future, one can imagine a developer from Rockstar Games using an RL agent to play GTA, combined with a future 3D model generator that can create new landscapes, NPCs, and even plots on the fly.

Overview of popular AI-based games

There are many examples of AI applications in game development. Each of these AIs has a different level of complexity. Here are some examples of the most well-known AIs in the gaming industry.

F.E.A.R. is a first-person shooter and psychological horror game in which the main player fights robots, various creatures, and cloned super soldiers. The game's creators developed an AI that generates context-sensitive behavior. For example, the so-called replicants can use the game environment to their advantage. They can flip tables to cover behind them, open doors, break windows, and even alert other NPCs to their actions. Additionally, the game AI can perform flanking attacks, extinguish fires, and throw grenades to force the player out of cover.

Starcraft II is a real-time strategy game where players compete in 1v1, 2v2, or 3v3 arenas. The main goal of players is to destroy the enemy bases. To do this, they need to create units that effectively destroy enemy units. Players can choose different AI levels - from easy to Cheater 3. One of the ways the Starcraft II AI defeats players is by processing information about the players' bases. The AI can use this information to plan its actions and attack the player's weak points. For example, if it finds that the player has weak defense on a certain side of their base, it can concentrate its forces on that side and attack it. Starcraft II as a game has also become a popular environment for AI research. In a joint effort, Blizzard and DeepMind released the public Starcraft II environment, where scientists and enthusiasts can test various AI algorithms.

Alien: Isolation is based on the sci-fi horror film series "Alien". The game takes place 15 years after the events of the film, when Amanda Ripley, daughter of Ellen Ripley (the main character of the film), investigates her mother's disappearance. The game developers use artificial intelligence to measure the stress level experienced by the player. The AI constantly measures three critical elements: whether the player sees the Xenomorph, the distance between the Alien and the player, and the proximity of the Xenomorph to the motion sensor.

Analyzing these three factors, the AI system in Alien: Isolation adjusts the behavior of the alien to create dynamic and unpredictable experiences. If the stress level is too low, the AI can move the xenomorph closer to the player to increase tension. If the stress level is too high, the AI can move it away to give the player a short break. This dynamic system creates a sense of uncertainty and fear, making the game more like a horror.

Forza Horizon is a racing simulator that emulates the real characteristics and handling of racing cars. For controlling driver bots in Forza, a self-learning neural network is used. The developed AI system can observe real players and imitate their driving style. This AI system, called Drivatar, was recently connected to Microsoft's cloud services, from where it receives driving data from a huge number of users. This data is used to create AI systems that imitate other players from around the world, not only their strengths but also their weaknesses, to provide an unpredictable racing experience.

Criticism of AI usage

Despite the hype around AI in games, there are also concerns about the industry's over-reliance on AI. For example, the use of AI-generated content raises questions about authorship and ownership. Who owns the intellectual property rights to AI-created works of art and music? AI generates content based on existing data, and the likelihood that the algorithm uses a piece or motif of someone else's composition is high. In addition, the industry's focus on AI-based developments can lead to a loss of diversity and creativity, as well as the perpetuation of existing biases and stereotypes. Developers, policymakers, and gamers need to have a critical conversation about the implications of AI in games and ensure transparency, ethics, and accountability in its implementation.

Conclusion: AI as an assistant, not a replacement

In conclusion, it should be noted that AI has undoubtedly revolutionized the gaming industry, changing the ways developers create and interact with games. AI has opened up new opportunities for game development - from creating art and 3D models to creating NPCs and dialogues. However, as AI becomes more integrated into the industry, it is necessary to be aware of the potential risks and limitations associated with the excessive use of AI.

While AI can augment human creativity and accelerate development, it also raises important questions about authorship, responsibility, and the potential homogenization of game design. Over-reliance on AI can lead to a loss of human touch and creativity, as well as the perpetuation of existing biases and stereotypes.

Furthermore, the use of AI in games raises concerns about job displacement and the exploitation of developers' labor. As AI takes on more tasks, will human developers become redundant? How will the industry ensure a fair distribution of AI's benefits among all stakeholders?

Ultimately, AI should be seen as a tool, not a replacement for human creativity and ingenuity. By recognizing both the potential and pitfalls of AI in games, we can harness its capabilities to create innovative, engaging, and inclusive games that enhance the gaming experience for everyone.


Game testing process using AI to find bugs.
Comments