Tiles
Tiles are the building blocks of a tilemap. Each tile represents a discrete unit of the map, such as grass, water, rock, or wall.
Tile Declaration
In Acid, tiles are declared using the tile keyword. Each tile can be assigned a unique bit identifier that references its sprite or texture in a tilesheet.
Syntax
tile <tile_name> = bit(<bit_id>)
Example
tile grass = bit(24)
tile water = bit(25)
tile rock = bit(26)
tile path = bit(30)
tile wall = bit(31)
This declares five tiles, each linked to a specific bit for rendering.
Using Tiles in Maps
Tiles are arranged in rows or columns and combined to form the overall map layout.
rows {
1 * rock -> 20 * path
3 * wall -> 17 * grass
}
This example defines rows where tiles appear consecutively for specified counts.
Tile Attributes and Properties
Currently, tiles are identified by their bit indexes, which tie to graphical assets.