Milestone 1: Mooncake

From Asgard
Jump to: navigation, search

The purpose of this milestone is to implement a system for storing Animations in the database, grouping Animations for quick retrieval, and loading the Animation groups into the game.

Animation Storing

Animations will be stored in a database table called Animation that is composed of the following attributes:

Attribute
Type
Size
Key
Nullable
AnimationName VARCHAR
100
Primary false
SpriteSheetName VARCHAR
50
Foreign false
Height INTEGER
5
false
Width INTEGER
5
false
StillCount INTEGER
2
false
StillsPerSecond INTEGER
2
false


SpriteSheetName from the Animation table will be used to access information from the SpriteSheet database table:

Attribute
Type
Size
Key
Nullable
SpriteSheetName VARCHAR
50
Primary false
NumColumns INTEGER
2
false
NumRows INTEGER
2
false

Animation Grouping

Animations will be grouped into objects called Drawables which will be stored in the Drawable database table. The table has the following attributes:

Attribute
Type
Size
Key
Nullable
DrawableName VARCHAR
50
false
AnimationName VARCHAR
100
Foreign false

Animation Loading

The following command syntax will be used to load Animations from the Console:

loaddrawable <DrawableName> <XCoordinate> <YCoordinate>

DrawableName will be used to access the Drawable database table and to generate a Drawable object. Each AnimationName associated with the DrawableName will be used to retrieve its corresponding Animation record. The information in the Animation record, including pertinent SpriteSheet information, will be used to create an Animation object. The Animation object will be loaded into the Drawable object. This process will continue until all Animation objects are created and loaded into the Drawable object.

For details on the composition of Animation and Drawable objects, see Milestone 2: Loki.