Animations

On top of sprites I’ve created a simple animation format. It is a cel animation based format (https://en.wikipedia.org/wiki/Traditional_animation)

So the format is as simple as just listing a bunch of images that should be rendered in order, and for how many frames each image should be rendered.

The classes are AnimationFrameDefinition, AnimationSequenceDefinition and Animation.

AnimationFrame is static data that describe an individual frame of the animation, like which image to use, the duration of that frame, hotspot and other flags like flipping etc.

AnimationSequenceDefinition is also static data and contain a list of AnimationFrameDefinitions together with sequence specific data such as if the sequence should loop, how many frames it have etc.

Animation is the runtime data that describe which AnimationSequenceDefinition should be played, on which game object the animation should be played, which frame in the sequence it is currently on etc.

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *