# ============================================================================ # 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. # # ludicc tools/atlas.ludic --headless -o build/atlas # ./build/atlas && sips -s format png out.ppm --out atlas.png # # Replaces the old tools/atlas.c, which used the C runtime that no longer # exists. It is the same program, in the language it is a tool for. # ============================================================================ game Atlas { const DIR: str = "assets/kenney/tiny-dungeon/Tiles" const N: int = 132 const COLS: int = 12 const CELL: int = 24 system Sheet phase Start { clear(0x101018) for i in 0 .. N { let col = i % COLS let row = i / COLS let x = col * CELL let y = row * CELL # tile_0000.png … tile_0131.png — the id is the file's number let id = load_png(tile_path(i)) if id >= 0 { draw_sprite(id, x + 4, y + 2) } text_int(x + 1, y + 18, i, 0x8090b0, 1) } present() quit() } # build "