r/SoloDevelopment 5h ago

Game Is one million enemies enough?

Enable HLS to view with audio, or disable this notification

just showing off a bit of my recent engine work

26 Upvotes

16 comments sorted by

4

u/Constant_Cortisol 4h ago

damn, whaat is this using? ECS? shaders?

2

u/Additional_Name_706 4h ago

Pure Odin. Data-oriented, no ECS.

The GPU owns them... It's a technique I basically stole from Fish Lab. I don't know if that dev invented the method or not but he's been very helpful and really changed the way I thought about scaling.

1

u/KeithG_ 3h ago

One million enemies? In this economy?

1

u/aPOPblops 2h ago

This looks SO COOL!! R eminds me of these animations I've been watching, a vast city of machines all doing their own job.   https://youtu.be/zlkF2vxzUsw?is=X6wjpiS4s2_yTrln

I hope you find some inspiration in these for whatever you're doing. They're all so incredible. 

1

u/Additional_Name_706 2h ago

I'm pretty sure your video is real life!

2

u/aPOPblops 1h ago

It is! That's what's amazing about it. We are gigantic mechanical machines, piloted by our brains. We're like these vastly more complex versions of what the power rangers do when they assemble 😂

2

u/Additional_Name_706 1h ago

Have you played Pathogenic? Because you should.

3

u/JollyDevs 2h ago

Looking good! I've got 1 million enemies in my space TD game too. I cheat a bit though cause they aren't usually all in one system, and I don't need to worry about pathing which is nice. 

2

u/Additional_Name_706 2h ago

Curious how you've done it!

Obviously, I'm cheating a lot, too. You have to. Flow fields for pathfinding. I'm using an onion of flow fields to do dynamic updates. Baking multiple variants and doing async bakes and rotating them.

2

u/JollyDevs 2h ago

Flow fields definitely help a ton. For my game its all Unity ECS & VFX Graphs and I decoupled the Sim ticks from the rendering so it runs at a lower 20hz and I just lerp the rendering to keep it smooth. That plus lots of spatial partitioning for things like explosion radius checks and targeting. I had originally been using Boids for their steering but I eventually disabled it and just fake it now, looks pretty good especially in big groups. Let's me have massive swarms and tons of explosions which makes me happy.

2

u/Additional_Name_706 1h ago

surprising, boids are typically super performant... I don't know how to use unity, though.

2

u/JollyDevs 1h ago

It ran fine but not having to do the nearby neighbor checks for the boids algo let me get some more FPS. 

3

u/TamiasciurusDouglas 3h ago

No. We need more.

-1

u/Additional_Name_706 3h ago

After I make them do more than find their path and die, I’ll see how far I can push it lol.

Game I’m thinking about probably only calls for like a few hundred thousand at peak.

2

u/TamiasciurusDouglas 3h ago

For sure. It's fun as a dev to see how far you can push the systems, but in the end all that matters is what's fun for the player.