4 ms·
>Nothing fundamental seems to prevent the compiler+runtime from: - laying out instances of the same Component next to each other in memory - Burst.Compiling the
by Mirioron 6y ago
>Nothing fundamental seems to prevent the compiler+runtime from: - laying out instances of the same Component next to each other in memory - Burst.Compiling their Update() functions - adding backwards compatible APIs to do parallel loops etc over multiple components
And if those Update functions reference other objects and do something with them? If the engine automatically realigns the order in which Update is called on objects then you can't do something like that, you'd run into weird behavior. Or do I somehow misunderstand?
From what I understand, the whole point of DOTS is to get people to write code that uncouples the data from what operates on the data. Once they have that they can shuffle these calls around.
- mpartel 6y agoOf course you'd still have restrictions on the code if you want it magically optimized, just as with DOTS. But you're right to be skeptical, this is not something I've thought through that thoroughly :)
- adamnemecek 6y agoThe point of ECS is that your mental model is very close to the GPU. Some sort of rewriting process would just add additional costs to this.