# atlas.ludic — render a Kenney tile pack as one index-labeled sheet, so you can # see which sprite id is which before referring to it in a game. # # bin/ludicc --headless tools/atlas.ludic -o build/atlas # ./build/atlas < /dev/null && sips -s format png build/out.ppm --out atlas.png # # A tool written in the language it is a tool for: one Start handler draws every # tile with its number underneath and quits, and the headless build leaves the # frame in build/out.ppm. program Atlas { const DIR: string = "assets/kenney/tiny-dungeon/Tiles" const TILE_COUNT: int = 132 # tile_0000.png … tile_0131.png const COLUMNS: int = 12 const CELL: int = 24 const SPRITE_INSET_X: int = 4 # centre a 16px sprite in a 24px cell const SPRITE_INSET_Y: int = 2 const LABEL_INSET_X: int = 1 const LABEL_INSET_Y: int = 18 const BACKDROP: int = 0x101018 const LABEL_COLOR: int = 0x8090b0 # "