Sprite

A Sprite is a distinct group of pixel data that will be drawn onto a screen. This is independent of the format used to store the sprite. For example, a sprite could be saved on a hard drive as a png image file, or it could be contained alongside other sprites in a spritesheet.

Spritesheet

A single image file that contains one or more sprites, laid out in a regular grid of a set size. There may be differing numbers of rows and columns, but the latest version of Crunch assumes that the individual grid items are squares. A Spritesheet may have padding around the edge, and spacing between the sprites. Each sprite within a spritesheet is also referred to as a tile.

Tile Size

The size of a tile is defined in whatever units the containing image is defined in (points, pixels, etc) - typically pixels. The size of a tile is a consistent number for every tile in a spritesheet, and does not change regardless of the amount of blank space in a given tile.

Some examples in these docs will use the term "units" to refer to a size when the specific unit does not matter. For example, this spritesheet is 10 units across with a tile size of 2 units:

An example of sprites in a spritesheet

Padding

Spritesheets may have some amount of padding around the edge that does not contain any sprites. In the context of crunch, padding exclusively refers to the units of empty space on the edges of an image, and not blank space within the image.

For example, this spritesheet is 10 units across, with a tile size of 2 units and 1 unit of padding:

An example of sprites in a spritesheet with padding

Spacing

The term "spacing" or "space" is used to refer to the empty pixels left between each sprite in a spritesheet. This is distinct from empty pixels within a tile, which is not considerd to be spacing.

For example, this spritesheet is 10 units across, with a tile size of 4 units and 2 units of spacing between each sprite both vertically and horizontally:

An example of sprites in a spritesheet with padding

results matching ""

    No results matching ""