From 6a48653569f1a50b03ca9326161f5e61788ebc63 Mon Sep 17 00:00:00 2001 From: calic Date: Thu, 28 May 2026 20:49:26 +0200 Subject: [PATCH] vagrant: migrate map to v3 multi-layer + autotile + overrides manifest.module + new dep on lib-asset.prototype-blob-geom v0.1.0 (companion lib for the design paper's reference asset set + Python atlas-packer) + asset_aliases entry for blob_testbench (mixed 3-material atlas: grass/stone/wood x 14 slots = 42 tiles) and blob_rect_stone (single-material atlas for vertex-painted autotile) - removed subterrain_tiles asset_alias (no longer used) bumped lib-core.maps dep 0.4.0 -> 0.5.0 vagrant_test.map.json rewritten as native schema-v3 with three non- empty terrain layers, exercising all renderer paths in a single map: - surface (tiles[] path, multi-material via blob_testbench): grass-solid floor across all 400 cells 14-wide x 3-tall showcase strip on rows 10-12 columns 2-15 displays every slot of every material the atlas ships (slot 0 through 13 x grass/stone/wood, ids 1..42 visible at a glance) - topsurface (tiles[] path): 2x4 wood overlay decoration on rows 3-4 columns 2-5 - wall (vertex-painted autotile with blob_rect_stone material): 21x21 vertex grid; 80 vertices painted in a border-ring pattern so the renderer's bitmask + 47->14 slot lookup produces the visually-correct stone wall around the 18x18 interior; plus 3 interior pillars (cells 9:7, 7:15, 13:15) authored as overrides with slot 0 (isolated), demonstrating that the override sublayer can place truly-1-cell-isolated material which the any-corner vertex rule alone cannot express assets/tiles/vagrant_test.tilemap.json removed; under schema v3 the engine resolves the palette directly from the atlas's tiles.atlas.json, the standalone tilemap.json was unused (atlas-bootstrap stub path took over since M.2). Closure verifies SPOREL_CI=1 ./Sporel.exe --module=vagrant-skeleton rc=0 with 60 render_frame_ok, both atlases load (no magenta- placeholders), walkability rule (surface present + wall absent) correctly treats border + pillars as non-walkable. Co-Authored-By: Claude Opus 4.7 (1M context) --- assets/tiles/vagrant_test.tilemap.json | 11 --- manifest.module | 10 +- maps/vagrant_test.map.json | 128 ++++++++++++++++--------- 3 files changed, 89 insertions(+), 60 deletions(-) delete mode 100644 assets/tiles/vagrant_test.tilemap.json diff --git a/assets/tiles/vagrant_test.tilemap.json b/assets/tiles/vagrant_test.tilemap.json deleted file mode 100644 index 6dae3bb..0000000 --- a/assets/tiles/vagrant_test.tilemap.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id": "vagrant_test", - "tile_size": 32, - "asset_pack": "tiles", - "tiles": [ - { "id": "floor_001", "walkable": true, "texture": "floor_001" }, - { "id": "floor_002", "walkable": true, "texture": "floor_002" }, - { "id": "floor_003", "walkable": true, "texture": "floor_003" }, - { "id": "wall", "walkable": false, "texture": "floor_004" } - ] -} diff --git a/manifest.module b/manifest.module index 2e561a3..6a0db5b 100644 --- a/manifest.module +++ b/manifest.module @@ -7,16 +7,18 @@ "entry_point": "init.lua", "asset_aliases": { "subterrain_player": "lib-asset.prototype-subterrain", - "subterrain_tiles": "lib-asset.prototype-subterrain", - "subterrain_world": "lib-asset.prototype-subterrain" + "subterrain_world": "lib-asset.prototype-subterrain", + "blob_testbench": "lib-asset.prototype-blob-geom", + "blob_rect_stone": "lib-asset.prototype-blob-geom" }, "deps": [ {"id": "lib-core.input", "version": "0.4.0"}, {"id": "lib-core.camera", "version": "0.3.0"}, {"id": "lib-core.render", "version": "0.1.0"}, - {"id": "lib-core.maps", "version": "0.4.0"}, + {"id": "lib-core.maps", "version": "0.5.0"}, {"id": "lib-core.puppet", "version": "0.5.0"}, {"id": "lib-core.interaction", "version": "0.1.0"}, - {"id": "lib-asset.prototype-subterrain", "version": "0.2.0"} + {"id": "lib-asset.prototype-subterrain", "version": "0.2.0"}, + {"id": "lib-asset.prototype-blob-geom", "version": "0.1.0"} ] } diff --git a/maps/vagrant_test.map.json b/maps/vagrant_test.map.json index 4f43b32..cbd88ed 100644 --- a/maps/vagrant_test.map.json +++ b/maps/vagrant_test.map.json @@ -1,49 +1,87 @@ { + "schema_version": 3, "id": "vagrant_test", - "tilemap": "subterrain_tiles", "size": { "w": 20, "h": 20 }, - "tiles": [ - 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,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0, - 0,0,0,0,0,0,0,90,0,0,0,0,0,0,180,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - ] + "atlases": [ "blob_testbench", "blob_rect_stone" ], + "layers": { + "surface": { + "tiles": [ + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 224, 224, 224, 224, + 224, 224, 240, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 224, 224, 224, 224, + 224, 224, 464, 480, 496, 512, 528, 544, 560, 576, 592, 608, 624, 640, 656, 672, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224 + ] + }, + "topsurface": { + "tiles": [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +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