3 ms·
Both of those look like perfect cases for composition instead of inheritance.
by Sakos 3y ago
Both of those look like perfect cases for composition instead of inheritance.
- coffeebeqn 3y agoAnyone not using components for game objects is insane. How do you add a fire breathing horse without that
- feoren 3y agoYes, now take it further. Anyone not using components for all domain modeling is insane. Why does everyone assume this wonderful practice only applies to games?
- maeil 3y agoAny recommendations for where we can learn about this approach, or recommended search terms? I'm struggling to find anything through Google that isn't about the Unity component system in specific. Is it this? [1] https://en.wikipedia.org/wiki/Entity_component_system https://en.wikipedia.org/wiki/Entity_component_system
- v1sea 2y agoYeah, that is it. I found this book to be pretty good https://gameprogrammingpatterns.com/ https://gameprogrammingpatterns.com/ and heard good things about https://www.gameenginebook.com/ https://www.gameenginebook.com/
- Asraelite 3y agoBecause the negative consequences are more pronounced in games. You can more easily get away with not doing it in other domains, so there it may be silly, but not "insane".