beeeen
beeeen7h ago

Any support for DOTS/ECS entities?

Will Normcore ever support entities in the Unity DOTS or ECS stack? My team and I have been considering a game which would best be done on DOTS. If normcore doesn't support entities directly, how likely is it that we could make a "bridge" between DOTS and normcore's api?
3 Replies
kapa.ai
kapa.ai7h ago
Hi @beeeen. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the provided knowledge sources, there is no specific information about Normcore's support for Unity's DOTS (Data-Oriented Technology Stack) or ECS (Entity Component System) entities. The documentation primarily focuses on Normcore's own architecture and components, which appear to be designed around traditional Unity GameObjects and MonoBehaviours. Normcore's architecture is built on concepts like RealtimeComponents and RealtimeModels, which are closely tied to Unity's standard component-based system. The Realtime API and Room + Datastore API don't mention any integration with DOTS or ECS. Regarding the possibility of creating a "bridge" between DOTS and Normcore's API, it's difficult to provide a definitive answer based on the available information. Such an integration would likely require significant custom development, as Normcore's synchronization system is designed around its own component and model structure. For the most up-to-date and accurate information on potential DOTS/ECS support or integration possibilities, I recommend reaching out directly to the Normcore team or consulting their community resources. As mentioned in one of the documents, you can contact them or join their Discord community for more specific inquiries about future support or integration possibilities. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai7h ago
<@690217885540417680> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
maxweisel
maxweisel6h ago
We built a DOTS/ECS version of Normcore and shipped it in Nock, but we chose not to release it due to some instabilities with DOTS/ECS and some architectural choices they made that make a few CPU optimization problems impossible to fix For platforms outside of a Desktop only game that will always have a beefy multi-core CPU, I wouldn’t recommend it The main two issues we ran into: 1. Rendering requires using the Hybrid Renderer package, which we found to be pretty poor performance-wise, and buggy. It seems bridging DOTS/ECS to URP still has a long way to go. 2. This is the big one, all entities must be created/destroyed from the main thread, and all jobs must also be scheduled from the main thread. For us, that caused a /ton/ of problems around simulation. If your simulation requires a few jobs to run in one frame and needs to potentially create/destroy entities between those jobs, you spend a ton of frame time waiting for the job to be scheduled, for it to finish, and for the main thread to be woken up to then create/destroy entities before repeating the process. We found we were more performant doing all of the work synchronously on the main thread, which defeated the whole purpose of DOTS/ECS and made the development costs of working around the DOTS/ECS architecture / memory layout not worth it. There's also no way to split the DOTS/ETC main thread and the rendering main thread which would have solved our problem and allowed us to have jobs/simulation that spanned multiple frames. We talked to Unity about it, and they said it's not something they can fix. All of that to say, if you would still like to move forward, we had good luck in the prototyping days before we built this storing entities as models in the datastore directly, but again, you don't really gain any benefit by having anything in DOTS/ECS if you do that. And if you want to utilize the new Unity Physics package, you can call it directly and manually step it, which we found to be more performant, and easier to work with.

Did you find this page helpful?