26-12-2023, 10:55 PM
Quote: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!
Yes, I understand. The reason I mentioned multiplayer is this:
My understanding is that the DOTS Physics engine is designed to be deterministic and to work with Netcode. My thinking is that there must be some compromises in order to achieve this.
Optional aside: In the past, I've implemented my own physics engine and low-latency networking library (this was in Java, built on of Libgdx and KryoNet). I even made a few games with it that I still play with old schoolfriends occasionally. In order to do this, I created my own Fixed Point library to guarantee determinism (yep, I implemented most maths functions, including trig, in Fixed Point - lots of bit shifting and lookup tables
![Gran sonrisa Gran sonrisa](https://obi.virtualmethodstudio.com/forum/images/smilies/biggrin.png)
The game I'm currently making will be more like, let's say, Vampire Survivors - nothing online, but epic quantities of enemies. Therefore, I want a very simple physics engine with great performance. Obi seems a pretty good fit for this.
Here's the promised video.
![Gran sonrisa Gran sonrisa](https://obi.virtualmethodstudio.com/forum/images/smilies/biggrin.png)
I pre-bake the animation meshes in a manner similar to this, and then I've implemented my own renderer that uses GPU instancing to render masses of enemies efficiently (i.e. all enemies of the same type on the same frame of animation are drawn with a single call).
I can go up to 5k enemies without my GPU sweating, but my CPU starts to struggle at 1k or so - probably because it's 7 years old now. I'll need to do a bit of profiling to see.
I've not yet looked at how Obi interacts with Terrain - do you think this could potentially be a bottleneck?