[][src]Module ggez_goodies::tilemap

An efficient way of drawing images composed out of tiles from a spritesheet, such as oldschool RPG maps.

Includes a loader for the tiled map editor format. It doesn't use all of the tiled map format's features though. Notably: Only one TileSet is allowed, the TileSet may have only one Image, properties and such are not used...

You CAN draw directly from a tiled map, but this does a lot of the annoying work of layering and coordinate transformation for you. ggez uses float indices for rect's while Tiled uses pixel offsets, this tries to cull out tiles that are entirely obscured by other tiles, etc.

Re-exports

pub use tiled;

Structs

Layer

A single layer in the map. Each item is a source rect, or None if there is nothing to be drawn for that location, which makes life a lot simpler when drawing layered maps.

Map

A collection of layers, all the same size and all using the same Tileset.

Tile

A struct containing info on how to draw a tile. Having this rather than just a bare Rect or something does make life easier, honest.

TileId

Newtype struct for a tile ID.

Tileset

A collection of Tile definitions and the Image they refer to.