I decided I would develop a game engine in c++, so I was thinking about different ways of handling objects. I also have experience with ROBLOX, so I know that it uses an object-oriented design as opposed to an entity component system.
Here's a simplified example of how ROBLOX's system works: there's a base class called
Instance that all objects in a place (a
DataModel instance) inherit from.
Instances representing a physical object inherit from the
BasePart class, static
Instances which only provide services inherit from
ServiceProvider, and instances which exist solely to modify or contain their parent or child instances inherit from the
Instance class itself. For example. if you add a
SpecialMesh instance as a child of a
Part instance, the part will be rendered using the appearance of the mesh. (there are probably some other examples I'm missing as well).
ROBLOX also allows you to modify the properties of instances directly, with the user interface grouping properties together by what things they affect, rather than providing them as traditional components. For example, a
Part instance would have an Appearance section in the GUI properties window which shows properties like
In addition, I've worked on code for the GoldSrc and Source engines (for modding, of course), and they appear to use a very similar system.
This seems to go against a lot of what I've learned about designing systems like it, with most developers preferring to take the ECS route instead. Why did ROBLOX decide to use this object-oriented design rather than the more conventional entity component system?