npcs , players , guards/bats/pets and monsters/bosses all having coords , hp , size , mesh and more stuff in common
which would fit better inheritance or composition ? and why ?
should i just follow "has a" and "is a" theory ?
edit:
at efficiency they both sounds the same to me as at inheritance it would always go through base class tree until it reach the derived class , at composition it would do the same for custom types to use them at the composite class (the big complex one), not sure if im missing anything behind the scenes but it won't hurt asking
which would fit better inheritance or composition ? and why ?
should i just follow "has a" and "is a" theory ?
edit:
at efficiency they both sounds the same to me as at inheritance it would always go through base class tree until it reach the derived class , at composition it would do the same for custom types to use them at the composite class (the big complex one), not sure if im missing anything behind the scenes but it won't hurt asking