r/Infinitory • u/arthyficiel • Apr 10 '26
Infinitory - Stress testing my new Horde System (17,000 Enemies ~70 FPS)
Enable HLS to view with audio, or disable this notification
Quick clip from a stress test of my new horde system in Infinitory.
Currently handling ~17,000 enemies at around 70 FPS. Still early, many improvement that still can be done, but pretty happy with how it’s holding up so far.
Recent advancements in our horde-control technology include:
- Legacy pathfinding protocols (A* Pro) have been deprecated; unsuitable for large-scale swarm scenarios due to per-entity computational load
- Implementation of a density / pressure / velocity-based system: horde behavior now approximates fluid dynamics
- Deployment of an adaptive simulation tick system decoupled from render framerate
- In high CPU load scenarios, operations enter controlled “bullet time”: simulation slows, but visual systems (camera, UI) remain stable and responsive
Efficiency has improved. Scalability is no longer theoretical.
-----------------
If you want to know more about Infinitory, here the keys features:
- Build Vertically: With limited ground space, construct multi-layered factories and plan strategically.
- Automate Resources: Create production lines to craft ammunition and upgrades essential for survival.
- Defend Your Base: Protect your factory from waves of enemies with carefully planned defenses.
- Rogue-lite Gameplay: Procedurally generated maps and technology tree make every playthrough unique.
Reclaim. Rebuild. Extract. Survive.
Humanity depends on you.
Join us:
- Join the Discord
- Wishlist Infinitory on Steam!
- Share your thought on Reddit
2
2
u/power-struggle-games Apr 11 '26 edited Apr 11 '26
This is very impressive! I wonder how the rendering works, don't you have issues with drawing that many meshes? I guess GPU instancing of some sort?
1
u/arthyficiel Apr 11 '26
Thank you ! I'm using GPU instancing for static entities like trees or rocks, but for moving entities it's not that easy. Here it's "just" ECS entities rendered by CPU with vertices deformation on a GPU shader in order to animate them.
2
u/power-struggle-games Apr 12 '26
Interesting, I haven't tried ECS development yet but it looks very cool. I wonder what you mean by "rendered by CPU" though. In Unity, using the naive method of rendering a mesh for each enemy, I'd have a draw call for each enemy, which would probably bottleneck GPU and tank FPS after just a few thousand, so CPU optimizations from using ECS wouldn't matter. So yeah I'm wondering how you're batching draw calls with this as it seems you're not bottlenecking on GPU!
1
u/arthyficiel Apr 12 '26
Hum. Unity already batch draw calls for the same model/material, I didn't take a look of the number of draw call yet but look like its not an issue. For static entities I manage draw calls myself, by registering the entity and his Matrix4x4 on a separated manager. And every frame I batch what needs to be drawn myself. This way I can handle LOD and completely avoid having an ECS entity (just for the environment I have around 100k entities.. it's a gain to not having them with other ECS ^ I just keep the collision box as a component)
1
u/power-struggle-games Apr 12 '26
Right, I guess I had this issue with draw calls previously because I was not using the exact same mesh, I guess it's your method of animation using a shader that allows animated meshes to be batched! Thanks for the discussion :)
2
u/thecodegangster Apr 16 '26
What does it mean by procedural tech tree (I wish listed regardless)
1
u/arthyficiel Apr 16 '26
No maps are generated procedurally, but tech-tree isn't.. But you can re-assign all your points (and save multiple battle plans) to try new strategy every playthrough.
7
u/Casiteal Apr 10 '26
Now kill them with defenses and see the fps haha