NPC chase & escape (demo)

A tiny reference for hostile NPCs that still let weak players escape: aggro radius, leash from home, distance-based de-aggro timer, and a faster player so kiting works. Use WASD / arrows (desktop) or drag on the arena (touch).

Ready.

100% · caught in melee = drain · R restart

What you’re seeing

  • Orange ring — aggro around the NPC: enter it and it pursues.
  • Cyan dashed ring — stay outside this from the NPC ~2.3s to force de-aggro.
  • Grey dashed ring — leash from its home: pulled past this and it resets.
  • Or drag it so far from home that leash breaks — it resets immediately.

Pattern to port into your engine

  1. Aggro radius — acquire target.
  2. Chase — move toward player at NPC speed.
  3. Attack only in melee — damage while in short range.
  4. Leash anchor — abandon if pulled too far from spawn.
  5. Evade / forgive timer — if target stays beyond “lost” distance long enough, clear aggro.
  6. Speed curve — player slightly faster than NPC so escape is skill-based, not hopeless.

Note: This tool is for general information only, not professional advice. Full disclaimer

Related tools