• 2D Game. Entity Hierarchy help
    5 replies, posted
I'm starting to work on an entity hierarchy system. A base entity class and all the other classes inherited from that class. After I've learned how to do that I'm going to read up on a component based system. So I'm wondering, has anyone done this before? And what functionality should the classes have? I mean, what functionality should the base entity have, the Static entity class, the moveable class, etc.
Obviously that depends on your game. Add functionality as you need it.
It's more like a 2d platformer game
[QUOTE=AtomiCol;17759149]I'm starting to work on an entity hierarchy system. A base entity class and all the other classes inherited from that class. After I've learned how to do that I'm going to read up on a component based system. So I'm wondering, has anyone done this before? And what functionality should the classes have? I mean, what functionality should the base entity have, the Static entity class, the moveable class, etc.[/QUOTE] The question is - what functionality do you REALLY want to gain from inheriting from a base class. An are you REALLY going to use this functionality... You should also read up on the disadvantages of inheritance.
I know it's not very efficient. But I want to learn how to do it before I move on to something else.
[QUOTE=AtomiCol;17759351]It's more like a 2d platformer game[/QUOTE] 2D platformer is more of a genre. My point is that only you can decide what kind of functionality each part of the hierarchy will have. "Entity class hierarchy" is merely a model, not a recipe.
Sorry, you need to Log In to post a reply to this thread.