Jump to content
  • Advertisement
  • entries
  • comments
  • views


Sign in to follow this  


int32 sizeX;
int32 sizeY;

Image image;
bool alphaBlend;
bool mirrorH;
bool mirrorV;
int16 anchorX;
int16 anchorY;
int16 hitL;
int16 hitT;
int16 hitR;
int16 hitB;

int16 cellsX;
int16 cellsY;
int16 areaX;
int16 areaY;
std::vector frames;

Sheet sheet;
float fps;
int16 loops;
int16 begFrame;
int16 endFrame;
int16 track;

int16 anchorX;
int16 anchorY;
int16 track;
float frame;
Animation animation;
std::map animations;

So after some more thought, the above is what I have come up with.

Images, themselvs are not directly utilitized by any top-level objects. Instead a Sheet object must be defined ".sheet", a Sheet is a row/col arrangement of Images, wherin each image is contained in a Frame object, and contains information such as anchoring, and a hit-test bounding box. A sheet can then be attached to an Animation object, which defines a way to display the sheet, the simplest being a single frame. An entity defines none or more Animation objects and methods on the entity can be used to play an animation.


Some of you might note that Sheet has two properties areaX and areaY. These values are used to describe how much 'tile area' any image in the sheet will occupy. For most things a single tile of displacement is enough, but for large tables, or things of that kind, the displacement must be set properly to allow for proper collision and drawing.
Sign in to follow this  

1 Comment

Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!