bevy-tilemap
Installation
SKILL.md
Bevy tilemap
When to use
Load this before storing a grid of tiles. Bevy draws cells with Sprite and a TextureAtlas. The grid itself is a resource and a set of entities you own.
ECS shape
- Resource:
TileGridowns width, height, and one cell id per slot. - Component:
TileCellstores the grid coordinate on the sprite entity. - Draw:
TextureAtlasLayout::from_gridslices a sheet.Sprite::from_atlas_imagepicks a cell index. - Schedule: spawn the grid in
Startup. Autotile rules are a plain function over neighbor ids.
Examples
[dependencies]
bevy = "0.20"