Ticket #675 (new enhancement)
AnimationManager and real Frame objects
| Reported by: | chewie | Owned by: | FIFE |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.3.5 |
| Component: | engine/core/video | Version: | trunk |
| Severity: | normal | Keywords: | animation, frame, manager, lightrenderer, genericrenderer, renderernode, image |
| Cc: | Blocked By: | ||
| Blocking: | Time planned: | ||
| Time remaining: | Time spent: |
Description
The current animation handling in FIFE is pretty basic:
- a frame is just a pointer to an image, no real object
- an animation just keeps a list of assigned frames and provides some implementations to access a certain frame
A better solution would be something like this:
- a frame is an object, which has a pointer to an image and several attributes like e.g. offset, alpha value etc.
- an animation is a small manager for frame objects
- a new AnimationManager? manages the animations, e.g. making animations accessible via an unique identifier
Usecase:
- if a client tries to create an animation with one physical image but many more frames, and only uses the additional frames for slightly altering the way FIFE should render the image (e.g. with lower / higher alpha values), it is not possible ATM. Instead, a client is forced to create a physical copy of this image, alter the alpha value and repeat that step for the desired result (e.g. an animated object that fades in and out)
A typical application for the described usecase is the GenericRenderer? and the LightRenderer?. Especially the LightRenderer? could use animated RendererNodes? with different alpha values for the frames to simulate a "pulsing" light
Note: See
TracTickets for help on using
tickets.
