Skip to content
Ingo Ruhnke edited this page Mar 22, 2015 · 3 revisions

A Sprite is a simple nimated image. A Sprite can have multiple actions. Both PNG and JPG formatse for images are supported.

C++ Specification:

SpriteAction:
  std::string name;
  float       speed;
  Vector2f    offset;
  float       scale;

SpriteData:
  SpriteAction[] actions;

File Format - *.sprite

(sprite
  (action
    (name "default")
    (speed 4.0)
    (images "foo/bar/frame1.png" "foo/bar/frame2.png")
    (offset 100 10))

  (action
    (name "run")
    (speed 15.0)
    (image-grid
      (file "human_turn.png")
      (x-size 98)
      (y-size 125))))

Other stuff from sprite which might not yet be implemented: 'Origin', alpha, color, pingpong, blendfunc, scale, vflip.

Clone this wiki locally