Original Post
Hey,
I''m trying to design an Animation system for a simple 2D game I''m making.
So far I have a CSprite class that will load up the sprite and has functions for selecting the active frame of that sprite.
I was thinking I should now make a CAnimation class that would handle the logic behind when we move to the next frame of the sprite.
So this CAnimation class would have a HAS_A relationship with CSprite (or possibly a IS_A its TBD). And CAnimation''s purpose is to choose when to show the next frame of the sprite, frame rate independatly.
I then I was planning on having another class called CPlayer for my main character. CPlayer would have a CAnimation for each animation Player has. For example if I had 3 animations... walk_left, walk_right, and jump, CPlayer would have 3 CAnimation''s... CPlayer''s main purpose would be selecting which animation is currently being used (state management).
Does this make any sense or am I way off base here? Can anyone suggest any alternatives?
Also how much overhead is associated with QueryPerformanceCounter?
Thanks in advance!