Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 2.4 KB

SPRITESHEET.md

File metadata and controls

63 lines (46 loc) · 2.4 KB

PIXELIX

PIXELIX

License

Sprite Sheet

Purpose

Use a sprite sheet for 2d animations. The sprite sheet parameters are defined in a additional file to the bitmap file in JSON format. The file shall have the file extension ".sprite".

Example of a fire animation (see ./doc/spritesheet/example):

{
    "texture": {
        "width": 40,
        "height": 8,
        "frames": 5,
        "frame": {
            "width": 8,
            "height": 8
        },
        "fps": 5,
        "repeat": true
    }
}

WifiStatusPlugin

The texture describes the bitmap texture which contains one or usually several sprites. The bounding box of a sprite is called frame.

Because a texture may not be filled with sprites, the number of frames (frames) is given. If the number of frames is not given, it will be assumed that the texture is completely filled.

The order of each frame is from top left to the right and in the next row again from left to right and so on. If not further specified, it will be automatically repeated. If only on animation cycle is required, it will be specified with repeat by setting it to "false".

The frames per second (fps) specifiy how fast the animation runs.

Tools And Scripts

Use the ./doc/spritesheet/create_sprite_sheet.py to create it or manually.

Limitations

  • Only .bmp format is currently supported, uncompressed and without color palette.

Issues, Ideas And Bugs

If you have further ideas or you found some bugs, great! Create a issue or if you are able and willing to fix it by yourself, clone the repository and create a pull request.

License

The whole source code is published under the MIT license. Consider the different licenses of the used third party libraries too!

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.