multi-board files

This commit is contained in:
2026-06-12 23:35:40 -05:00
parent 8e79b30583
commit e5c6affc41
4 changed files with 28 additions and 15 deletions
+15 -11
View File
@@ -1,10 +1,14 @@
[map]
[world]
name = "Kiln Demo"
start = "start"
[boards.start.map]
name = "Starting Room"
width = 60
height = 25
player_start = "@" # placed by the '@' grid char (convention)
[palette]
[boards.start.palette]
" " = { archetype = "empty", tile = " ", fg = "#000000", bg = "#000000" }
"#" = { archetype = "wall", tile = "#", fg = "#808080", bg = "#606060" }
"+" = { archetype = "banana", tile = "#", fg = "#808080", bg = "#606060" }
@@ -17,7 +21,7 @@ player_start = "@" # placed by the '@' grid char (convention)
# name the built-in generators (random dark, low-saturation texture cached at
# load); a palette entry could also be a fixed glyph like
# `{ tile = ".", fg = "#222", bg = "#000" }`.
[floor]
[boards.start.floor]
content = """
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
gggggggggggggggggggggggggsgggggggggggggggggggggggggggggggggg
@@ -46,13 +50,13 @@ gggggggggggggggggggggggggsgggggggggggggggggggggggggggggggggg
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
"""
[floor.palette]
[boards.start.floor.palette]
"g" = "grass"
"d" = "dirt"
"s" = "stone"
" " = { tile = "~", fg = "#6666ff", bg = "#000066" }
[grid]
[boards.start.grid]
content = """
############################################################
# #
@@ -83,7 +87,7 @@ content = """
# Placed by its grid character `G` (uppercase-letter convention for objects)
# rather than x/y; the cell under it loads as Empty.
[[objects]]
[[boards.start.objects]]
fg = "#aa3333"
bg = "#000000"
palette = "G"
@@ -94,7 +98,7 @@ script_name = "greeter"
# A solid object placed by x/y that paces east on its own. Demonstrates the
# rate-limited move(), the blocked() collision check, the Queue object, and the
# bump() hook (walk the player into it to trigger a bump).
[[objects]]
[[boards.start.objects]]
x = 10
y = 12
fg = "#33aa33"
@@ -102,7 +106,7 @@ bg = "#000000"
tile = 1
script_name = "mover"
[[objects]]
[[boards.start.objects]]
palette = "M"
tile = 15
fg = "#ffdd88"
@@ -112,7 +116,7 @@ name = "muffin"
script_name = "muffin"
# Notice board — long scroll to test overflow and scrolling.
[[objects]]
[[boards.start.objects]]
palette = "B"
tile = 240
fg = "#cc9944"
@@ -121,7 +125,7 @@ solid = true
name = "noticeboard"
script_name = "noticeboard"
[scripts]
[boards.start.scripts]
greeter = """
fn init() {
log(`hello from object — player at ${Board.player_x}, ${Board.player_y}`);
@@ -205,4 +209,4 @@ fn bump(id) {
" Unauthorised notices will be removed.",
]);
}
"""
"""