Game Development Reference
In-Depth Information
Animation2D . Animation2D is an abstract representation of all animations, so ev-
ery animation construct in the language is derived from this. Every animation
contains an animation ID for addressability purposes inside the language and in-
formation as to whether or not the animation loops.
AnimationStrip2D . We have found that in most cases of a spritesheet, the anima-
tions tend to be on a given line from left to right. Eberos GML2D models these with
the AnimationStrip2D construct, which represents a single strip of frames on the
spritesheet. The strip is composed of uniformly sized frames. This is a somewhat
rigid construct that allows rapid specification of simple animations. Each instance
of this construct contains information about a single animation such as the total
number of frames, the size of the uniform frames, the position in the sprite image
where the first frame appears, and the delay (in milliseconds) of each frame.
CompositeAnimation2D . There are also times when an animation inside the
spritesheet might be made up of frames of different sizes, or frames that are not
necesarily adjacent to one another; to model this kind of animation, we have the
CompositeAnimation2D construct. A CompositeAnimation2D is another kind of
Animation2D , and is used to represent animations at a deeper level of detail. Each
CompositeAnimation2D is composed of one or more Frame2D .
Frame2D . A Frame2D represents a single frame of the animation. This construct
gives a lower level of control over the modeling of the animations by allowing their
spcification of an animation on a frame-by-frame basis. Each Frame2D contains
information about its
position on the source spritesheet, its width and
height, its delay (in milliseconds), and its position in relation to other frames in the
animation.
X
and
Y
Figure 19.6. Basic class diagram for entity and collisions relationship.
 
Search WWH ::




Custom Search