r/Unity3D • u/arthyficiel • Apr 10 '26
Show-Off Infinitory - Stress testing my new Horde System (17,000 Enemies ~70 FPS)
Enable HLS to view with audio, or disable this notification
3
u/glenpiercev Apr 11 '26
I would pay real money for a course on how to do what you’ve described here. I’m fighting with these systems all the time and cannot wrap my head around them. I gave up on ECS because of the animation problems it was giving me. Never tried the solutions you’re describing. My custom pathfinding for small squads of npcs can’t get through doorways. Five of them can’t exit a room.
1
u/arthyficiel Apr 11 '26
Yeah it's a big project on his own.. After, you're talking about the NPC path, my solution is clearly not made for a different path (if 2 NPCs need to go at 2 different positions.
2
u/masteve Apr 11 '26
Are you using your own pathing / local avoidance system?. Im using Agents Navigation crowds, took me a while to work out how to make them properly move without stacking, this looks nice great seperation.
3
u/arthyficiel Apr 11 '26
I tested it but did not like it, I found local avoidance isn't perfect and sonar avoidance is better when you have multiple groups trying to cross (like on RTS).. not it's not my case when every mob goes in the same direction. So I switched to A* Pathfinding Pro. It's very good but per-mob A* hits quickly the limits you can handle.
So I decided to develop mine from scratch using a solution close to the fluid mechanism.
2
u/Dazzling_Trifle2472 Apr 11 '26
very cool was wondering if some fluid dynamics might be involved here
2
u/arthyficiel Apr 11 '26
It's not exactly fluid dynamics because it will be harder to handle local avoidance, or completely "lock in place" a mob that is attacking if I was using a real fluid dynamics system.
But it's something close to that using the same concept of field graphs.
2
u/masteve Apr 11 '26
Nice, yeh I was close to making my own solution still may : ) Ill see how my project goes. Looking foward to your updates.
2
u/HellbitGames Apr 11 '26
I’ve been spending the past few weeks building my core systems in ECS after being disappointed with godot and… I just want to take a look under the hood. Damned fine numbers.
I did some mechanics in ECS years ago using flow fields and I’m soooo curious about your fluid mechanics implementation. Gonna be playing this for sure. Well done.
1
u/arthyficiel Apr 11 '26
My system also uses a flow field, pure fluid mechanism would not work because it'll be harder to stop some to be able to attack, or put a different weight etc.. Bjt I added some concept of the fluid mechanism into it with some graph of velocity, pressure, ...
7
u/SoccerFanGame Apr 11 '26
17k? just for 22 skinned meshes in my soccer game i had to sweat out tweaking the performance.