Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have three classes.

Monster derives from Animation. Animation derives from Collider. This is, monster is an animated collider.

However, I'd like to have animated objects that are not colliders.

Maybe it's a newbie question, but how?

share|improve this question

closed as off-topic by Byte56 Sep 14 '14 at 14:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Programming questions that aren't specific to game development are off-topic here, but can be asked on Stack Overflow. A good rule of thumb is to ask yourself "would a professional game developer give me a better/different/more specific answer to this question than other programmers?"" – Byte56
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

This is one of the best examples why use composition over inheritance. When you learned coding OOP, you were very often advised to derive... and derive, and derive. This is usually not (that) bad for applications but you will run into serious problems in games very soon. Exactly whose what you posted.
Entity component system design is frequently advised solution for games.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.