Hi all,
I'm attempting a game using a similar architecture found in the GCC book. I have a GameLogic class and View class. The logic contains the rules for updating the game universe whilst the view is a visual representation of the game world.
The logic notifies the view of any updates it may be interested in via an event manager.
One such event is the 'EventEntityCreate' which describes how the new entity should be displayed. Obviously sprites can either be a single, static frame or an animated sequence of frames. I'm not sure how best to embed this information in the event. I'm struggling to come up with an appropriate object that can represent this information. Maybe a static sprite and animated sprite are too different to be represented by a single object?
Dubiously named class attempts include "SpriteData", "SpriteFrames" etc. The data needed to describe an animation also includes fps, whether the animation loops or not etc, which don't make sense to be present for a static sprite.
Any advice on how you would tackle this would be much appreciated.