3 ms·
>However, there are certain situations where I cannot imagine working without OOP. (...) Similarly, a computer game, having an EnemyDemon inherit from Enemy, so
by coldtea 6y ago
>However, there are certain situations where I cannot imagine working without OOP. (...) Similarly, a computer game, having an EnemyDemon inherit from Enemy, so that it has .kill(), .damage(), and properties for health, speed etc.?
You'd be surprised. This is much cleaner, and more efficient too:
https://medium.com/ingeniouslysimple/entities-components-and-systems-89c31464240d https://medium.com/ingeniouslysimple/entities-components-and...
more in depth:
https://www.dataorienteddesign.com/dodbook/ https://www.dataorienteddesign.com/dodbook/