Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
One particle per enemy for MANY enemies
#4
(19-12-2023, 07:10 PM)Jambo Wrote: Oh wow, I wasn't aware of Unity DOTs. It looks like a great framework, though perhaps overkill for what I want to achieve. 
[...]
I'm not planning for the game to be online multiplayer, which would probably be the biggest benefit of going with DOTs. 

DOTS = Burst + Jobs + ECS. It's not necessarily related to online multiplayer (eg. you can also have thousands of enemies in local single player), the idea behind it is to lay out data in a way that's efficient for the computer to process, so that it can deal with much larger amounts of data. So instead of having the "GameObject" concept that both stores data (scattered around in memory) and implements logic, component data is stored in flat arrays that can be efficiently processed in parallel using "systems", and "entities" are just indices into those arrays. Hence the name Entity Component System. If it sounds similar to what Obi does it's because it is!

Obi uses Burst and Jobs, but instead of using Unity's ECS system it rolls out a custom ECS implementation specifically tailored to particles/constraints and builds a physics engine on top of it. So in a way, it's 66% DOTS.

(19-12-2023, 07:10 PM)Jambo Wrote: So far, I've had excellent results using Obi: I've basically made my own custom actor and blueprint that really don't do anything at all other than provision 5k particles.  I've then added some addition movement logic using custom jobs / IJobParallelFor.  For additional enemy state, I'm using my own data structure that maps 1:1 to the actor indices. 

If it works for you, then it's fine. Depending on how complex your enemy logic gets you might benefit from a more generic ECS system, but I guess it depends on the specifics of your game more than anything.

best of luck with your somewhat unorthodox use case Interesante, and let me know if you need any help!

kind regards,
Reply


Messages In This Thread
RE: One particle per enemy for MANY enemies - by josemendez - 20-12-2023, 08:03 AM