Game Enemy Design Starter Guide
I’ve been thinking a lot lately about how enemies in video games work, and through the research I’ve done so far, I’ve put together an enemy design starter guide to consider when planning enemy intelligence for any game.
The first thing I started with was assigning the 5 senses to my enemy, just to set a baseline for the enemy’s motion and drive.
Enemy Senses
- What does the enemy see?
- Player
- Obstacles
- Items
- Other enemies
- Can the player impede the enemy’s vision or sound?
- What does the enemy hear?
- Did the player set off an alarm to bring all the enemies to you?
- Is the player being too noisy?
- Did the player make a distraction that draws the enemy away from it?
- What does the enemy touch?
- Does it pick up items so the player doesn’t get them?
- Does it bump into obstacles or other enemies?
- Attacking falls under touch too
- What does the enemy taste?
- ….. Ok this one isn’t really applicable
- Well maybe your game is about baking the most perfect cake and if you mess up the recipe it tastes really bad. The enemy eats your awful cake, gets really mad, and boom – boss battle. I’m chock-full of ideas today. Don’t steal that one. I want to make a cake making game now. If you enter the battle fast enough while the cake pan is still hot, that could be a useful weapon, no?
- What does the enemy smell?
- Maybe the player fell into a pile of garbage and now the scent is a trigger for an enemy to know where they are.
- That was a bit of a stretch
This process not only helps categorize what your enemy can and can’t do, it also helps you really flesh out all of the different scenarios that may come up (or that you may design) in your game. Think about your enemy as a sentient being first – this allows you to get creative with how it interacts with your game.
Enemies have feelings too
- What is the enemy’s health?
- Does it have armour?
- Does it regenerate hit points?
- Is it immune to certain types of attacks?
- Can they dodge/counter?
- Any racial traits?
- What happens when it gets hit – is there some recoil or reaction?
- What happens when it is low health?
- Does it run away?
- Does it rage?
- Can it revive itself after dying?
Incorporating emotional responses into enemy design can be used to can help or hinder the enemy’s abilities in certain circumstances. This adds depth to the interactions between the player and enemy, providing recognizable patterns in enemy behaviour and adding personality quirks that can tie in with the storyline of the game. Perhaps your enemy is particularly in love with apples, so you know throwing an apple will draw your enemy to that. Or if your enemy is afraid of fire, holding a torch will keep them away. This even plays into how the enemy responds to attacks from the player, how the animations look and feel, how the enemy gets KO’d, and even what happens after the enemy dies.
Take some time to develop the character of your enemy, then incorporate those characteristics into your game design.
Enemy Interactions
From that, we can break the design down into specific interactions to begin to structure our code.
- Enemy interacts with the environment (movement & obstacles)
- Enemy interacts with the player (noticing, chasing, attacking)
- Enemy interacts with other enemies and items
Enemy and the environment
- What plane can the enemy move on?
- What is their speed?
- Does gravity affect the enemy
- If so, can the enemy jump or fly?
- How does the enemy interact with boundaries?
- Edges: Do they stop and turn around, or walk right off?
- Walls: When they run into a wall? Can they tell the difference between walls and obstacles?
- Do other obstacles affect the enemy?
- If so, which ones?
- What does the enemy do when it encounters each obstacle?
If you think of it in terms of a sight sense, you can start to determine which attributes of each object the enemy has access to. Does the enemy know how big something is? How much it weighs? does the enemy know where the health items are? Does the enemy know that that box it’s walking toward is covered in spikes?
Enemy and the player
- Does the enemy notice the player? (Some enemies just patrol mindlessly. Goombas.)
- How does the enemy notice the player?
- Player comes in range
- Player attacks enemy
- Player hits/uses some sort of environmental trigger
- ie Presses a button, knocks over a box, enters enemy’s house, eats enemy’s last piece of pie, etc.
- What does the enemy do when it notices the player?
- Move toward
- Range attack
- Teleports
- Calls all it’s buddies over to beat you up
- “Rage” – maybe it’s harder to kill, or attacks with more damage
- When/how does the player trigger wear off?
- Player retreats a certain amount
- Player hides for a certain amount of seconds
- Player closes door/unpresses button/leaves enemy’s house/replaces pie
- Maybe it doesn’t wear off and you just gotta bash the baddie!
Attacking the player
- What are the enemy’s attacks?
- Range vs melee
- What is the actual range for melee attacks, and for range attacks
- If both, how and when do they switch from range to melee?
- What triggers an enemy to attack?
- What is the damage done?
- How can attacks be countered/dodged? Can they?
Enemy and other things
- How do enemies interact with each other?
- Do they pass right through each other?
- Avoid each other?
- Bump into each other?
- Help each other?
- Are there tactics the player can use to discombobulate enemies?
- Enemies and items
- Do enemies know of helpful items that the player is after?
- Can enemies pick up items?
- Maybe enemies lay traps on items?
Good Question
The best help for starting out my enemy design was just asking a lot of questions and coming up with a lot of answers. The more answers you have, the more you will know how to code for all of those different circumstances. Asking “What happens when _____?” will assist you a lot when building your enemy class. And if the answer is “nothing” – make sure you code for “nothing” to happen!
Finally, I’d say keep it open and flexible. I’m a loosey goosey game developer, changing my ideas on the fly, and I always recommend adaptability to any developer out there, especially if it is a personal project. Have fun with it, see where it takes you, and allow bugs to turn into features!!
An Infographic for you <3
Here’s the real meat of this magical enemy design starter guide.
Check out my Enemy AI video to see how I incorporated this all into my own game. And let me know if this enemy design starter guide helped you at all in your own game 🙂
ok that’s all, byebye sweet peas! See you soon & happy devving!
-Julia
Amazing guide :3
Ty