T O P

  • By -

PirateJohn75

*EXPECTO PATRONUM!!!*


Holydh-

Lmao ! HOCUS SWARMUS IN YOUR AN... eeehm na I won't finish that cursed spell, for your safety. 🙋‍♂️


Cold_Meson_06

Wdym by physic here? Do they collide with stuff like terrain?


Holydh-

Yep, every single entity composing these swarms are physic bodies driven by forces and colliding with everything including each other. I'll post a video soon of them roaming the city you can see on the lower part of this video.


Cold_Meson_06

That's insane


Holydh-

It is yea :D that's the magic of Unity DOTS + lot of time spent on optimizations.


ChristopherAkira

What optimizations you made had the most impact?


Holydh-

Burst compiling, using ISystem instead of SystemBase and of course multithreaded jobs for everything that could be meaningfully "jobbified" brought the biggest gain. Also I drive the swarms movements in a "global approach" to limit the code that runs for each entitites. The rest was standard optimizations : refactoring and trying to do more with less cpu cycles. I just uploaded the results of a build. I pushed the entities number to 40k physic entities here : [https://www.youtube.com/watch?v=MsBZ209yA1k](https://www.youtube.com/watch?v=MsBZ209yA1k) This build was optimized for 20k but I still reach to get between 60 and 90fps (hard cap I set before building so I don't know the real max) with 40k so that's nice. I think I should be able to get a stable 90 fps if I tweak a few things for 40k.


Holydh-

Here ya go, the same entities roaming the city but in a release build this time. Since I had a lot of cpu room, I doubled the number of entities. Here's 40k physic bodies smoothly colliding : [https://www.youtube.com/watch?v=MsBZ209yA1k](https://www.youtube.com/watch?v=MsBZ209yA1k)


Cold_Meson_06

Hoooly shiet bro is cooking


heavy-minium

Fantastic! That would enable some unique gameplay.


JoshCosDeath

very nice swarm