#unityecs
Explore tagged Tumblr posts
Text
I need to learn Data Oriented Design
Today I wanted to start Unity’s “DOT’s Best Practices” course, but saw that I needed to first understand Data Oriented Design. Going down the wikipedia rabbit hole I found this online book on the subject. But fortunately Unity has an intro course “Understanding Data Oriented Design”.
I learned OO programming back maybe 1997 using Java v1.1. I picked Java over C++ because it forced you into an OO design. It was a really weird feeling when my brain finally switched into thinking about code in an OO way. Prior to that, I had only used procedural languages like BASIC and C.
I have a feeling that my brain will have to go through a similar change to think in DOD ways. Already I have issues with some of the assumptions about how objects are stored in memory when using a class:
You can still have contiguous arrays of objects in memory. But, I see here that even if it was perfectly lined up, there’s nothing in C# (the language used in Unity projects) that lets you access all of the Color properties as a single, contiguous array when it’s in an object:
So, if I’m understanding correctly, we will need to arrange properties by type in a contiguous area of memory to have the fastest access to each item. I guess you could still use objects, but the objects would need to use references to the array offsets for these properties.
Anyway, I only got a few paragraphs in before my brain started complaining. This should be interesting!
2 notes
·
View notes
Photo

via @amagitakayosi
WIP Unity ECS cloner test. Placing objects on the surface of 3D model.#madewithunity #unityecs #mograph #mothiongraphics #3D #cg pic.twitter.com/ShQfQnudcJ
— 𝘼𝙈𝘼𝙂𝙄 (@amagitakayosi) March 29, 2020
0 notes
Video
tumblr
Learning the basics of #UnityECS and accidentally made a boxy cloud simulator. #gamedev
1 note
·
View note