Enemy AI
What enemies can do
The full repertoire of an enemy: seeing and hearing, chasing, searching, fighting, dodging, hiding, fleeing and swarming.
- Sheet
- 11 of 18
- Latest release
- v0.42
- As of
- 2026-10-22
EngineD ships no enemies of its own. It ships what an enemy can do: see and hear you, raise the alarm, hunt you down, search for you when you hide, fight up close or from range, dodge, flee and climb the walls. A game picks from this repertoire for each kind of creature it makes, and tunes it with numbers.
Many abilities stay off until a game asks for them, so every creature's character is a deliberate choice: a rat that only bites, a soldier that hides between shots. Its body follows the same rules as the player's, so a door, a liquid or a gun behaves the same for both; only the decisions are its own.
| Group | What an enemy can do | Engine default |
|---|---|---|
| Senses and the alarm | See, hear and feel you; wake up and call its allies | On |
| Chasing and searching | Chase, remember where you went, search in stages, give up | On |
| Fighting | Charge and strike, keep at range, aim ahead of you, lob over cover | On |
| Group tactics | Surround you, ambush, shoot and hide, keep firing where you were last seen | Off until a game asks |
| Reflexes | Sidestep or duck a round, weave while closing in, run from a grenade | Off until a game asks |
| Staying alive | Avoid deadly liquids and ledges, swim for air; flee when badly hurt | On; fleeing when hurt off |
| Getting around | Walk, climb, swim, fly, walk on walls and ceilings, jump, hop, swarm | Per creature |
| Items and orders | Pick up weapons and ammo, drop them on death; obey the level's orders | Off until a game or level asks |
Defaults as of 2026-10-22.
Senses and the alarm
Sight is the main sense. An enemy's eyes are one or more vision cones fixed to the way its body faces: narrow for a sniper, wide for a sentry, a second one pointing backwards for a creature with eyes in the back of its head. Inside a cone it still needs a clear line to you; walls block it.
Hearing reaches a short way through walls and further when nothing is in between, and loud noises carry further. A sprint is far louder than a crouch-walk, so moving quietly is something you can play with. Touch always works: something at arm's length is felt, even through a cloak that hides you from every eye.
Until something disturbs it, an enemy rests: standing still, wandering, guarding a post or walking a patrol. Whatever wakes it (a wound, a noise, an ally's call, the sight of you) also tells it where to look. Waking is itself an alarm: it calls its allies, who pass the news on in turn, and a game can keep separate packs on separate alarm networks so the hounds never wake the turrets.
Chasing and searching
An enemy that can see you chases you. When you break line of sight it keeps heading for where you really went for a short while, the way a person runs round the corner you just took. Then it searches, in stages a game can reorder, repeat or remove.
- Last seenGoes to the place it last knew you were
- Ask alliesAsks enemies still in a fight where you are
- SweepChecks the hiding places nearby, or the air if it flies
- RoamWanders the area until its search runs out
- PortalMay try a nearby portal, in case you went through it
- Give upStands down and goes back to resting
An enemy can also be kept on a leash, an area it will not leave however the fight goes, so a guard holds its doorway. How enemies decide covers when a search ends; Navigation covers how it finds its way.
Fighting, alone and in groups
How an enemy fights follows from the weapon in its hands: hand a biter a gun and it fights like a gunner. A melee creature closes in, warns with a wind-up and strikes. A ranged one keeps its distance and backs off when you get too close. A game can add tactics on top: hiding between shots, or keeping up fire where it last saw you.
A group can surround you, each member drifting to its own place on a ring while it keeps attacking. It can also ambush: hold every attack until the ring has formed, then strike together. The ambush breaks the moment any member is attacked.
Aiming uses only what a person could see: where you are and how you are moving. An enemy aims ahead of a moving target, and throws a grenade either flat and fast or in a high lob, whichever clears the cover.
An enemy also knows when not to shoot: it holds fire when a friend stands in the line, and will not fire an explosive at a wall close enough to catch itself in the blast. The weapons themselves are on Weapons and projectiles.
Dodging, staggering and staying alive
A game can give a creature reflexes: sidestep a round it sees coming, duck under one, weave from side to side while closing in, or get clear of a live grenade. They only work once the enemy knows there is a fight, and their quick dash needs time to recharge.
A heavy hit, or one it never saw coming, can stagger an enemy: it loses its turn for a moment and any attack it was winding up is cancelled. A boss can be made unstaggerable. Whoever hurt an enemy becomes its target, whatever side they are on, which is all infighting is: a stray shot from one creature makes another turn on it. Hits are settled on Damage; what happens to the body after is Gore.
An enemy also looks after itself. It will not walk into a liquid that would kill it (a creature immune to lava wades straight in) or off a ledge while it fights, and a drowning swimmer drops everything to head for air. A creature can be set to flee when badly hurt and come back once it has healed a little, and one with no usable weapon left runs instead of fighting.
Getting around, items and orders
A creature moves in the ways its body allows: walking, climbing, swimming, flying, or walking on walls and ceilings. It can jump gaps, drop from heights it would survive, ride lifts and cross portals, or be made to travel only in hops, like a frog.
Wall-walkers in a group can swarm: each picks the floor, a wall or the ceiling, and the pack pours down the corridor using its whole cross-section. No pack walks in single file: each body's route varies a little and they keep some space between them. How routes are found is on Navigation; lifts, doors and the other moving parts are on Level machinery.
An enemy can be allowed to pick up weapons and ammunition lying nearby, and to drop what it carried when it dies; a creature can even burst into smaller ones. A level can also give it orders (hold here, walk there, shoot at that spot), which outrank its own choices. Pickups are on Statuses, factions and pickups.
Read on:
- How enemies decideTheir states, priorities and the rules that settle each choice.
- NavigationHow they find a way through doors, up ladders and across portals.
- Weapons and projectilesThe guns, rounds and swings they fight with.
- DamageHow every hit on them, or from them, is settled.