I everyone, i'm working on an indie game and i'm stuck with two problems
I have many similar units on screen so i decided to implement the flightWeight pattern so there is intrinsic and extrinsic parts
Q 1 : How to manage inheritance ?
If the game base class posses the object position and rotation for example and let says i have multiple inheritance level, where to put these attributes. I mean these attributes are state dependant so, it the should be the client to have these and manage it nut it the broke the inheritance. Any advices ?
Q 2 : How to manage state machine and behavior ?
My basic soldier unit have all the same same Ai behavior of cource ( they can attack, move, retreat, .. ) but their current state is not probably the same, one instance is moving another attack. So wich class should posses the state machine and the behavior ?
I don't know if it's clear. Feel free to ask more details, i will explain
Thanks in advance for any advices or anything !