Before I begin, I just want to say that I do not want to use inheritance. Grouping OOP objects and having them inherit from a shared or base class is not something I want to work with, not that it’s hard, but because I think it’s bad practice and unstable.
Anyways, I have a plot building project that I’m working on and there’s a lot of different objects you can build with. For example, there are the basic blocks like spheres, cylinders, wedges, and blocks but there’s also objects like fridges and beds.
All these objects have their own data that’s unique but they also have some shared data. An example is the fridge and cylinder object will have position and orientation data but only the fridge will have a method that allows it to be opened.
My question is how I should organize this type of structure without the use of inheritance? I’ve been looking into OOP factories(?) but I’m fairly new to OOP and I can’t see how that can be used in Studio?
Not only am I looking for the logic on an OOP factory that creates these objects but I need help with the explorer hierarchy organization as well. Should I have a constructor module for every object? If I don’t use inheritance, how can I organize them? What would that even look like?