How Video Game Developers Can Use AI

AI for game developers

Gamers now and then have been frustrated with how good the bots or NPCs (non-playable characters) are at playing games. While some of them present no challenge, NPCs in strategy games are often the biggest reasons for a joystick to be thrown out the window. Not only the challenges but also the visual effects and how realistic the games look in today’s era is astounding. All thanks to the hours spent by game developers on going through every detail and hard-coding them into the overall game design. However, with some of the features that AI has been providing these developers, giving attention to detail and making them as much immersive and interactive has become easier. With AI in the gaming industry, it is poised to further grow and enhance the user experience.

Below are some of the ways that game developers can use/have been using AI to reduce their burden and improve player experience.

Smarter Games

There are many algorithms like The Division’s AI-driven path-finding, City Conquest’s playtesting via genetic algorithm and more, to make games smarter. Making a game smarter means getting intelligent reactions from the non-playable characters (NPCs) inside the game. While there are still some who use scripting to control NPCs, algorithms and AI systems like above assist in managing these NPCs, thereby reducing the burden of hard-coding NPCs and saving programmers’ time.

AIM Daily XO

Join our editors every weekday evening as they steer you through the most significant news of the day, introduce you to fresh perspectives, and provide unexpected moments of joy
Your newsletter subscriptions are subject to AIM Privacy Policy and Terms and Conditions.

What’s unique about using AI and algorithms here is that these NPCs also learn from the actions taken by the player and change their behaviour accordingly. Leveraging AI and ML capabilities, game developers in the future can create games that can develop better design NPCs and manage their behaviours within the game using AI and ML algorithms like Steering Behaviours, Finite State Machines, etc. For one, AI characters in games are able to avoid obstacles, reach you, and dodge bullets using steering behaviour

For finite state machines, the most famous example would be PacMan’s ghost, the state machine is used to control how they behave. A ghost has several models in place for it to hunt, to be hunted, waiting to be released and dead. A state machine is what is used to drive the ghost’s actions and switch between states. More in how they are used here.

Download our Mobile App

Put in simple terms, in the future, as you play your game over and over again, these NPCs will learn more about the patterns you follow and the ways you play a game. So, we might witness that every time we defeat an enemy, the next one will be smarter.

An example of smart NPCs in today’s world would be from the game F.E.A.R, where enemies verbalise the path planning algorithms. These algorithms control their behaviour, the NPCs (soldiers) shout to a fellow NPC to tell them to hunch while also having the ability to call for backup when a player is winning.

Striving To Make Games More Real

In the past decade, game developers have revolutionised the games by delivering near real-world experience. There was a time when we played games in 2D, many games now use 3D rendering, which results in much better visuals, physics simulations and even VR/AR to change the way games are placed today completely.

Game developers today have tools (ESRGAN, NVIDIA) that have made it possible for them to create visually appealing, interactive games. Microsoft with NVIDIA has been working on tools like Windows ML and DirectML which adapt the gaming experience to match the tastes of the players. Developers can make use of this technology that works with DNNs to ease their workflow.

Another thing that’s helping game developers to make the old video games scale, fit current large screens, and make them realistic is the graphic cards. These graphic cards support multiple algorithms, such as FXAA and MSAA, for upscaling low-resolution images into images with more pixels. But, even this technique can be further improved.

Developers can use AI upscaling through machine learning to improve the quality of old games. By training an AI (from images related to the game) programmers can generate new high-resolution images with more detail.

Another more advanced application would be using VR haptics or imaging of the player, which will allow computer vision algorithms to detect body language and intentions to enhance NPC behaviours.

Creating A Universe On The Fly

Another exciting aspect of games is when one plays in an infinite universe. This does not mean that you can create as much as you like inside the game (Minecraft, Elite: Dangerous), it means that the game is ‘replayable’. Developers make use of something called procedural generation, where the programmer semi-randomises the game based on parameters provided. Games like No Man’s Sky have an infinite number of new worlds to discover that are generated as you explore more. This is made possible by ML algorithms that help with pathfinding and world creation.

Although procedural generation is not exactly AI, in the future, it can create environments inside games catered to the player’s preferences. Here, when combined with AI capabilities, the generation will happen based on the player’s in-game experiences, like the creation of a town or an object entirely new and not seen before inside the game the plate is in.

For A Better Overall Gaming

Players these days not only expect high-end graphics and great visuals, but they also expect them to be more immersive and interactive.

Let’s take the popular example of EA Sports’ FIFA 17- this game has an Ultimate Team Mode, which is more like a fantasy draft where you pick one of the five-player choices for each position. The AI then automatically determines the team chemistry based on the choices for each position. The reason why team chemistry is a parameter taken here is that the higher the team chemistry, the higher is the chance of better performance. 

As for interaction, the AI in the game boosts the morale of the team that is losing through increasing the crowd chants, which affects the players’ performances, something that is closer to the real-world.

Sign up for The Deep Learning Podcast

by Vijayalakshmi Anandan

The Deep Learning Curve is a technology-based podcast hosted by Vijayalakshmi Anandan - Video Presenter and Podcaster at Analytics India Magazine. This podcast is the narrator's journey of curiosity and discovery in the world of technology.

Sameer Balaganur
Sameer is an aspiring Content Writer. Occasionally writes poems, loves food and is head over heels with Basketball.

Our Upcoming Events

24th Mar, 2023 | Webinar
Women-in-Tech: Are you ready for the Techade

27-28th Apr, 2023 I Bangalore
Data Engineering Summit (DES) 2023

23 Jun, 2023 | Bangalore
MachineCon India 2023 [AI100 Awards]

21 Jul, 2023 | New York
MachineCon USA 2023 [AI100 Awards]

3 Ways to Join our Community

Telegram group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox