<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-bosses-and-enemies-decide-what-to-do-in-video-games-qapdq9eie" -->

---
title: How bosses and enemies decide what to do in video games
description: Enemy AI in video games is a set of pre-written rules, not real thinking, that controls how characters sense, decide, and act. The most common approach uses...
canonical: https://daily.dev/posts/how-bosses-and-enemies-decide-what-to-do-in-video-games-qapdq9eie
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How bosses and enemies decide what to do in video games | daily.dev
og:description: Enemy AI in video games is a set of pre-written rules, not real thinking, that controls how characters sense, decide, and act. The most common approach uses...
og:url: https://daily.dev/posts/how-bosses-and-enemies-decide-what-to-do-in-video-games-qapdq9eie
og:image: https://api.daily.dev/og/posts/qApDq9EIE.png
og:image:alt: How bosses and enemies decide what to do in video games
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How bosses and enemies decide what to do in video games

**[Unity](https://daily.dev/sources/unity)** · 9 min read · 2 upvotes · 0 comments

## Summary

Enemy AI in video games is a set of pre-written rules, not real thinking, that controls how characters sense, decide, and act. The most common approach uses states like patrol, investigate, attack, and flee, switching when conditions are met. Other approaches include priority lists (behavior trees) and scoring systems that weigh options like health and ammo. Enemies 'sense' players through vision cones, hearing ranges, and awareness meters, and telegraph attacks with sounds or animations so players can react fairly. Bosses add a story-like structure with build-up, escalation, a twist, and a final phase. The piece ends by promoting Unity Spark, a browser-based AI game creation tool.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://unity.com/blog/how-enemy-ai-works-video-games>

## Questions this post answers

### What is telegraphing in video game enemy design?

Telegraphing is a design technique where a game gives players a visual, audio, or animation cue before an enemy, boss, or hazard attacks. Common telegraphs include a wind-up animation, a glowing attack indicator, a warning sound, or a ground marker showing the attack's area. The cue gives players a fair window to dodge, block, parry, or counter.

_Designing fair combat encounters? Browse game design breakdowns like this on daily.dev._

### What are the different ways video game enemies decide what action to take?

Enemies typically use one of three approaches: finite states (like patrol, investigate, attack, flee, switching when conditions are met), priority lists organized as behavior trees that check conditions in order of importance, or weighing options where each possible action gets a score based on factors like health and distance, with the highest-scoring action chosen. Simple states work for most games, especially a first project.

_Comparing AI decision patterns for your own game? Keep architecture breakdowns like this nearby on daily.dev._

### What is a good structure for designing a video game boss fight?

A boss fight works best as both a skill test and a story. The story structure typically runs through build-up, a dramatic introduction, basic attacks to learn patterns, escalation with new attacks, a midpoint twist like a transformation, full intensity using everything the boss has, and a defeat with reward. As a test, list the skills to challenge, like jumping or blocking, then design attacks that test each one.

_Planning a boss encounter for your own game? Save design frameworks like this on daily.dev._

## Similar posts on daily.dev

- [Recreating the Late-'90s Console Shooter Enemy AI for an FPS](https://daily.dev/posts/recreating-the-late--90s-console-shooter-enemy-ai-for-an-fps-lqae7mwsw) · 80 LEVEL · 0 upvotes · 0 comments
- [The Low-Tech AI Of Elden Ring](https://daily.dev/posts/the-low-tech-ai-of-elden-ring-godrk7cdt) · Lobsters · 0 upvotes · 0 comments
- [The Revolutionary Impact of AI in Gaming](https://daily.dev/posts/the-revolutionary-impact-of-ai-in-gaming-ryz48pksd) · Game Designing · 0 upvotes · 0 comments

---

Tags: [#game-development](https://daily.dev/tags/game-development), [#game-design](https://daily.dev/tags/game-design), [#unity](https://daily.dev/tags/unity)

[View this post on daily.dev](https://daily.dev/posts/how-bosses-and-enemies-decide-what-to-do-in-video-games-qapdq9eie)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How bosses and enemies decide what to do in video games","url":"https://daily.dev/posts/how-bosses-and-enemies-decide-what-to-do-in-video-games-qapdq9eie","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-bosses-and-enemies-decide-what-to-do-in-video-games-qapdq9eie"},"datePublished":"2026-10-27T19:05:33.673Z","dateModified":"2026-10-27T19:25:32.996Z","description":"Enemy AI in video games is a set of pre-written rules, not real thinking, that controls how characters sense, decide, and act. The most common approach uses...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ef98d55a4c34805d9d1aa4320232d948?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ef98d55a4c34805d9d1aa4320232d948?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Unity","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Unity","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/9afe038cc27e4d95ad581284cea8578d","url":"https://daily.dev/sources/unity"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-bosses-and-enemies-decide-what-to-do-in-video-games-qapdq9eie","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"game-development,game-design,unity","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Unity","item":"https://daily.dev/sources/unity"},{"@type":"ListItem","position":3,"name":"How bosses and enemies decide what to do in video games"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-bosses-and-enemies-decide-what-to-do-in-video-games-qapdq9eie#faq","mainEntity":[{"@type":"Question","name":"What is telegraphing in video game enemy design?","acceptedAnswer":{"@type":"Answer","text":"Telegraphing is a design technique where a game gives players a visual, audio, or animation cue before an enemy, boss, or hazard attacks. Common telegraphs include a wind-up animation, a glowing attack indicator, a warning sound, or a ground marker showing the attack's area. The cue gives players a fair window to dodge, block, parry, or counter. Designing fair combat encounters? Browse game design breakdowns like this on daily.dev."}},{"@type":"Question","name":"What are the different ways video game enemies decide what action to take?","acceptedAnswer":{"@type":"Answer","text":"Enemies typically use one of three approaches: finite states (like patrol, investigate, attack, flee, switching when conditions are met), priority lists organized as behavior trees that check conditions in order of importance, or weighing options where each possible action gets a score based on factors like health and distance, with the highest-scoring action chosen. Simple states work for most games, especially a first project. Comparing AI decision patterns for your own game? Keep architecture breakdowns like this nearby on daily.dev."}},{"@type":"Question","name":"What is a good structure for designing a video game boss fight?","acceptedAnswer":{"@type":"Answer","text":"A boss fight works best as both a skill test and a story. The story structure typically runs through build-up, a dramatic introduction, basic attacks to learn patterns, escalation with new attacks, a midpoint twist like a transformation, full intensity using everything the boss has, and a defeat with reward. As a test, list the skills to challenge, like jumping or blocking, then design attacks that test each one. Planning a boss encounter for your own game? Save design frameworks like this on daily.dev."}}]}
```

