Hi,
i’m currently working on an isometric, tilebased survival game. The landscape is 3D, the objects are pixelart 2D. I can post Screenshots later in this thread, if anyone is curious
My problem atm is, that i’m unhappy of how i implemented entities. My world consists of chunks, 64x64 tiles. Each chunk handles everything on it, for example drawing and updating animals. There are some different kind of entities: some are purely decorative (grass), some are static (a tree) and some are dynamic (an animal). On top of that, some may be animated and most of them have to be pickable (which i use colorpicking for). This classification into 3 parts made the most sense for me: Decoentities won’t be permanent or usable in any way, static entities are usable and stay where they are (like a tree) and dynamic entities will move around by themselves, so they have to check if they left their original chunk.
Currently i use inheritance. Here is a generated classdiagram:
http://imagebin.org/index.php?mode=image&id=204944
I didn’t catch the animation aspect with that because there would be too many constellations, it just feels wrong and too complicated. Does anyone know a solution to code this nicely? Is there a nice way to implement such “features” like pickable or animatable?
Should i simplify some aspects, for example just make everything in principle animatable and dynamic (the player will be able to move small static entities around, so they have to answer “did i leave my chunk” too).
I would be very thankful for some advice