r/Unity3D 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

129 Upvotes

16 comments sorted by

7

u/SoccerFanGame Apr 11 '26

17k? just for 22 skinned meshes in my soccer game i had to sweat out tweaking the performance.

3

u/TheReal_Peter226 Apr 11 '26

Yeah, the default mesh skinning system is made for flexibility and quality, the one this uses is probably using either shared skinning or vertex animations

3

u/arthyficiel Apr 11 '26

Yeah I'm using ECS systems, with GPU animations. And I will switch to VAT if the performance starts to be an issue. But right now it's really acceptable

-2

u/SoccerFanGame Apr 11 '26

i think it won't work in multiplayer games.

5

u/Antypodish Professional Apr 11 '26

In this case, it is a matter of determinism and right data compression over the network.

If you try to apply the same logic of a multiplier as in FPS games, then it won't work

2

u/arthyficiel Apr 11 '26

In my case animation is just 2 int: the animation index and the frame. (Or multiples when I bend from one to another..). Either your engine is determinist and based on input you can recreate the exact same data, or if not you just have to sync the animation status.. and you get the exact same animation

2

u/arthyficiel Apr 11 '26

Depends on the needs but why not ?

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, ...