How does the artificial intelligence work in 11th Dream? Let's look behind the curtains!

Posted by bluepulsargames on Nov 30th, 2019

When doing AI in shooter games, follow a simple rule: Don't make it too good. Nobody wants to play against an aimbot with 100% map knowledge. On the other hand, bots must be still challenging and the behavior must be interesting. Here is how we approached it.





The artificial intelligence has several levels. Topmost level makes decisions based on the stats and signals from the system below, for example: Gear up, find enemy, eliminate enemy.

Next layer breaks the strategy down to simpler tasks. It does all the path finding and target movement prediction.

Finally, the instructions are given to the navigation layer and targetting layer, which simulate pressing keys like human player would do.





Let's talk about the movement first.

Our bots follow hidden waypoints, which help them to reach their target and also contain information about bonuses. We place these waypoints manually, so we have fine control over the movements of the bots on the map.

Once the target waypoint is known, our bot walks from the first to the last one, steering towards target. If the next waypoint is above, the bot jumps and steers its motion mid-air to reach the destination.





The behavior totally changes when the bot spots an enemy. It goes "off the grid", rapidly strafing and jumping. This way the bot can pursue the enemy even when there are no waypoints around. Once the target is eliminated, it returns back to the waypoint grid.

Since bullets in 11th Dream travel rather slowly, AI must predict target's movement. If we consider that the target moves constantly in one particular direction, it leads us to pretty system of equations. However, player is most likely going to strafe, jump and dodge. Therefore, we keep an average velocity and movement direction, which results in much more precise targetting.

But this behavior proved to be too good, leaving the player no chance to defend. At the same time, we wanted the AI to be really challenging. We ended up (literally) shaking with predicted target position, lowering the initial accuracy but eventually getting the perfect aim. This aiming time depends on selected AI difficulty.





We hope that you find this overview of AI in 11th Dream interesting. Maybe you'll recognize the patterns while in-game next time. If you have any questions, suggestions or comments, please tell us, we are always happy to answer.

We would like to ask you to vote for 11th Dream in Steam Awards for visual style category. Every vote counts, every vote motivates us to pursue our original work.

11th Dream is currently on sale, grab same difficulty for lower price! Also, you are welcome to join our Discord where we run giveaways. You can watch there how we struggle with multiplayer development and steamworks integration into ingame map editor.

Cheers!

Michal // Blue Pulsar Games