Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Splitting up objects attributes into separate arrays is required if you plan to work with those data on the GPU. I did it when working with Java and OpenCL, and wanted to efficiently access the same data trough Java objects and also in OpenCL kernels. OpenCL does not know about objects, like Java, but it can access data in arrays, so practically every Java object holds an index into the arrays of the different attributes.

Per my knowledge Unity ECS does not currently process data on the GPU, but uses ECS to split work to multiple threads on the CPU. If the threads work on data that only they need to touch, then there is no need to synchronise them. It is also more cache efficient to read and write data from a couple of arrays sequentially, than to pull objects and their attributes from all over the heap.

The idea of storing objects by attributes, instead of object instances is not new. Some clever allocator indeed might be new.

I suspect they want to make it harder for Unreal to make the same system. Unreal might have nice visuals, but scaling was not their strength before.



Yeah I think it's a huge roadblock for Unreal. Though, I'm not sure that the patent would preclude a system which organizes memory layouts at build-time rather than runtime (though I could be wrong about that). Could be a good opening for Unreal, though to this point I think they've (disappointingly) shown little interest in any kind of ECS system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: