Next: , Previous: , Up: Graphics   [Contents][Index]


2.3.4 Tile Maps

A tile map is a scene created by composing lots of small sprites, called “tiles”, into a larger image. One program for editing such maps is called Tiled. Chickadee has native support for loading and rendering Tiled maps in the (chickadee graphics tiled) module.

Procedure: load-tile-map file-name

Load the Tiled formatted map in file-name and return a new tile map object.

Procedure: tile-map? obj

Return #t if obj is a tile map.

Procedure: tile-map-orientation tile-map

Return the orientation of tile-map.

Procedure: tile-map-width tile-map

Return the width of tile-map in tiles.

Procedure: tile-map-height tile-map

Return the height of tile-map in tiles.

Procedure: tile-map-tile-width tile-map

Return the width of tiles in tile-map.

Procedure: tile-map-tile-height tile-map

Return the height of tiles in tile-map.

Procedure: tile-map-tilesets tile-map

Return the tilesets for tile-map.

Procedure: tile-map-layers tile-map

Return the layers of tile-map.

Procedure: tile-map-properties tile-map

Return the custom properties of tile-map.

Procedure: point->tile tile-map x y

Translate the pixel coordinates (x, y) into tile coordinates.

Procedure: draw-tile-map tile-map [#:layers] [#:camera] [#:origin] [#:position] [#:scale] [#:rotation]

Draw the layers of tile-map as viewed from camera, a 2D vector offset. By default, all layers are drawn. To draw a subset of the available layers, pass a list of layer ids using the layers keyword argument.

Procedure: tileset? obj

Return #t if obj is a tileset.

Procedure: tileset-name tileset

Return the name of tileset.

Procedure: tileset-first-gid tileset

Return the starting GID of tileset.

Procedure: tileset-size tileset

Return the number of tiles in tileset.

Procedure: tileset-tile-width tileset

Return the width of tiles in tileset.

Procedure: tileset-tile-height tileset

Return the height of tiles in tileset.

Procedure: tileset-atlas tileset

Return the texture atlas for tileset.

Procedure: tileset-tiles tileset

Return the tiles in tileset.

Procedure: tileset-properties tileset

Return the custom properties of tileset.

Procedure: tile? obj

Return #t if obj is a tile.

Procedure: tile-id tile

Return the ID of tile.

Procedure: tile-animation tile

Return the animation for tile.

Procedure: tile-properties tile

Return the custom properties of tile.

Procedure: animation-frame? obj

Return #t if obj is an animation frame.

Procedure: animation-frame-tile frame

Return the tile for frame.

Procedure: animation-frame-duration frame

Return the duration of frame.

Procedure: tile-layer? obj

Return #t if obj is a tile layer.

Procedure: tile-layer-name layer

Return the name of layer.

Procedure: tile-layer-width layer

Return the width in tiles of layer.

Procedure: tile-layer-height layer

Return the height in tiles of layer.

Procedure: tile-layer-tiles layer

Return the tile data for layer.

Procedure: tile-layer-properties layer

Return the custom properties of layer.

Procedure: object-layer? obj

Return #t if obj is an object layer.

Procedure: object-layer-name layer

Return the name of layer.

Procedure: object-layer-objects layer

Return the objects for layer.

Procedure: object-layer-properties layer

Return the custom properties of layer.

Procedure: map-object? obj

Return #t if obj is a map object.

Procedure: map-object-id obj

Return the ID of obj.

Procedure: map-object-name obj

Return the name of obj.

Procedure: map-object-type obj

Return the type of obj.

Procedure: map-object-shape obj

Return the shape of obj.

Procedure: map-object-properties obj

Return the custom properties of obj.

Procedure: polygon? obj

Return #t if obj is a polygon.

Procedure: polygon-points polygon

Return the list of points that form polygon.


Next: , Previous: , Up: Graphics   [Contents][Index]