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

Both of those look like perfect cases for composition instead of inheritance.


Anyone not using components for game objects is insane. How do you add a fire breathing horse without that


Yes, 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?


Any 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


Yeah, that is it. I found this book to be pretty good https://gameprogrammingpatterns.com/ and heard good things about https://www.gameenginebook.com/


Because 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".




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

Search: