# 40'000 NPC with collision avoidance — retained record

> Retained reddit record from reddit:gamedev.

Canonical: https://highsignal.app/data/records/0be1c39f9d5392de

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:gamedev)  published 2026-09-21 10:29 ingested 2026-09-22 02:37

[original source ↗](https://www.reddit.com/r/gamedev/comments/1wm8zw9/40000_npc_with_collision_avoidance/)

## retained text



```
I'm developing an Indie game, custom Vulkan 1.3 graphics engine, C++23, Actor model to utilise all CPU cores, and the engine can process over 40'000 NPC characters with collision avoidance, squad formations, infinite procedural terrain, thousands of trees all thanks to modern GPU instancing.  
AMD 3700X, Navi 5600XT GPU (6 year old hardware), 140 fps at 2560x1440 when 40'000 NPC on screen at once.

I was thinking of creating a "horde" game.  Increasing number of enemy waves approach your fortification, and your squad defends the fortification.  After each wave, you level up (better weapons, more squad members).  As the fortification falls, you have to "fall back" to the next fortification.  Bonus points for protecting villagers as you fall back.  Ultimate level will have 40'000 attacking from all directions, with catapults, trebuchets, greek fire etc.   
  
When your character dies, you spawn into next squad member / team mate.  You issue the fallback command.   So the more squad members you keep alive, the more chances you have in later waves.  Each fortification has ammo supply, reinforcements etc.

Arcade gameplay with large counters "enemy remaining, villagers, squad members". 

As you run through the procedural world, I also want some wild animals to attack, and keep in mind you are chased by the horde.  Potentially set up choke points, demolish a bridge and watch the horde fall into the river below, then they have to "go around", which gives you a breather.

I'm thinking 15 waves or enemies or so.

I've been developing my engine for years, but just recently implemented instancing for skeleton animations, so wondered how much I can push on screen at once, and with instancing got a pleasant suprise that I can push 80'000 with respectable frame rates on 6 year old hardware.

Does this sound like a fun game?  What would a game like this need to be really fun?
```



document fetched 2026-09-22 00:25 · canonical https://reddit.com/r/gamedev/comments/1wm8zw9/40000_npc_with_collision_avoidance
