diff config/game.toml @ 36:a464bd43b76c 1.0.0

clean documentation rewrite
author ark
date 2026-10-21 22:34 +0200
parents 85d23328a215
children
line wrap: on
line diff
--- a/config/game.toml	Tue Oct 20 19:54:56 2026 +0200
+++ b/config/game.toml	Wed Oct 21 22:34:43 2026 +0200
@@ -1,27 +1,19 @@
 # game settings. tools/build.py checks this file and writes www/data/config.js.
 #
 # units: distances in map pixels (pixels of the map image as scanned), times
-# in seconds, speeds in map pixels per second.
-#
-# source markers, as in doc/balance.md:
-#   notes    from the original design notes or drawing sheet, decided
-#   decided  decided after the notes were written
-#   guess    a starting value for playtesting, expected to change
-#   derived  calculated from other values
-#   proto    chosen while building the prototype, not in the docs
-#            (see "prototype notes" in doc/roadmap.md)
+# in seconds, speeds in map pixels per second. doc/architecture.md lists
+# the sections.
 
 
 [scale]
-map = 1.0           # notes
-sprite = 0.25       # notes ("maps scaled approx 400%"), towers, monsters, projectiles
-coin = 0.4          # guess, 0.25 makes them about 10 pixels
-hp_bar = 0.25       # guess
+map = 1.0
+sprite = 0.25       # towers, monsters, projectiles
+coin = 0.4
+hp_bar = 0.25
 
 
-# monsters. coins are set apart from hp (decided): regular monsters drop
-# 0.10 to 0.20 coins per hp, bosses 0.2.
-# hit_radius is a share of the scaled sprite's smaller side.
+# monsters: hp, coins dropped on death, speed. boss marks the boss of a
+# map, b0 for map0 and so on.
 
 [monster.m0]
 hp = 5
@@ -103,7 +95,7 @@
 # level 1 and level 5; the build fills in the levels between in equal steps,
 # rounded to whole numbers when both ends are whole. cost is the price of
 # building (level 1) or of upgrading to that level. attack_time is the time
-# between attacks, the same at every level (decided). projectile_speed 0
+# between attacks, the same at every level. projectile_speed 0
 # means a melee tower: each attack damages every monster in range. damage
 # may be left out for a tower that only slows.
 
@@ -181,7 +173,7 @@
 speeds = [1, 2, 4]
 
 
-# sound events (doc/sound.md). the recordings come from art/sounds/, named
+# sound events (doc/art.md, sound). the recordings come from art/sounds/, named
 # after the event. per event: volume is a share of full volume. min_interval
 # is the least time between two plays; plays in between are dropped. beep is
 # the placeholder for an event without a recording, as notes of [frequency in
@@ -190,7 +182,7 @@
 enabled = true          # until the player switches sound on or off in the game
 volume = 0.8            # base for all sounds
 beep_wave = "square"
-music_fade = 0.4        # seconds the splash screen music takes to fade out. proto
+music_fade = 0.4        # seconds the splash screen music takes to fade out
 
 [sound.event]
 t0_attack = { volume = 0.6 }
@@ -214,13 +206,12 @@
 button_tap = { volume = 0.3, beep = [[1000, 0.02]] }
 map_won = { volume = 1.0 }
 map_lost = { volume = 1.0 }
-intro = { volume = 1.0 }   # splash screen music, looped. proto
+intro = { volume = 1.0 }   # splash screen music, looped
 
 
-# sprite drawing direction (art.md): angle the drawing points to as drawn,
-# 0 right, -90 up. sprites not listed do not turn. set by hand, the towers
-# checked in temp/preview/towers.png.
-# adjusted by hand.
+# sprite drawing direction (doc/art.md): angle the drawing points to as
+# drawn, 0 right, -90 up. sprites not listed do not turn. set by hand, the
+# towers checked in temp/preview/towers.png.
 [art.angle]
 t1 = -2
 t1_2 = -3
@@ -242,12 +233,8 @@
 p3 = -45
 
 # rotation point as a share of the trimmed image's width and height, for
-# sprites that do not turn around their centre (art.md). proto, checked in
-# temp/preview/towers.png. t1: the centre of the base square measured on
-# source_sheet_2 cutouts. t2: the middle of the rows at least 60 % as wide as
-# the widest row, which leaves out the barrel. t3: the centroid of the shape
-# with parts narrower than 41 pixels removed.
-# adjusted by hand.
+# sprites that do not turn around their centre (doc/art.md): the middle of
+# the tower's body. set by hand, checked in temp/preview/towers.png.
 [art.pivot]
 t1 = [0.37, 0.5]
 t1_2 = [0.30, 0.5]
@@ -267,18 +254,17 @@
 
 # where the button of each screen sits on the screen's drawing: the top left
 # corner of the separate button image, in pixels of the trimmed drawing.
-# proto, found by matching the button image against the drawing.
 [art.screen]
 splash = [479, 463]
 map_won = [210, 225]
 game_lost = [172, 230]
 game_won = [373, 383]
 # the logo and help buttons beside the play button on the splash screen:
-# top left corner and height, in pixels of the trimmed splash drawing. proto
+# top left corner and height, in pixels of the trimmed splash drawing
 splash_logo = [119, 463, 164]
 splash_help = [896, 463, 164]
 # the email address on the help popup, a tap on it writes a mail: top left
-# corner, width and height, in pixels of the drawing. measured, with a margin
+# corner, width and height, in pixels of the drawing, with a margin
 help_email = [690, 1505, 665, 100]
 
 
@@ -315,11 +301,11 @@
 starting_coins = 10
 early_bonus = 0.05
 wave_count = 6
-monster_share = [36, 25, 18, 12, 9]     # fitted in tools/simulate.js; % of regular monsters by count, m0-m4
-wave_size = [4, 7]                      # fitted; regular monsters in the first and the last wave (draft, tools/balance.py)
-first_wave = [1, 2, 2, 4, 5]            # fitted; wave in which each monster level first appears, m0-m4 (draft)
-spawn_interval = 1.0                    # fitted; seconds between spawns
-path_half_width = 19                    # measured from the earlier masks, centre line to road edge
+monster_share = [36, 25, 18, 12, 9]     # draft: % of regular monsters by count, m0-m4
+wave_size = [4, 7]                      # draft: regular monsters in the first and the last wave
+first_wave = [1, 2, 2, 4, 5]            # draft: wave in which each monster first appears, m0-m4
+spawn_interval = 1.0                    # seconds between spawns
+path_half_width = 19                    # centre line to road edge
 spawn_distance = 50
 exit_distance = 40
 
@@ -359,122 +345,118 @@
 spawn_distance = 50
 exit_distance = 40
 
-# map0: drafted by tools/balance.py --draft from wave_count 6, wave_size [4, 7],
-# monster_share [36, 25, 18, 12, 9], first_wave [1, 2, 2, 4, 5]
+# map0 waves
 
-[[map.0.wave]]   # wave 1, 4 monsters, 20 hp, 4 coins
+[[map.0.wave]]   # wave 1
 monsters = { m0 = 4 }
 
-[[map.0.wave]]   # wave 2, 5 monsters, 45 hp, 6 coins
+[[map.0.wave]]   # wave 2
 monsters = { m0 = 2, m1 = 2, m2 = 1 }
 
-[[map.0.wave]]   # wave 3, 5 monsters, 45 hp, 6 coins
+[[map.0.wave]]   # wave 3
 monsters = { m0 = 2, m1 = 2, m2 = 1 }
 
-[[map.0.wave]]   # wave 4, 6 monsters, 65 hp, 8 coins
+[[map.0.wave]]   # wave 4
 monsters = { m0 = 2, m1 = 2, m2 = 1, m3 = 1 }
 
-[[map.0.wave]]   # wave 5, 6 monsters, 90 hp, 10 coins
+[[map.0.wave]]   # wave 5
 monsters = { m0 = 1, m1 = 2, m2 = 1, m3 = 1, m4 = 1 }
 
-[[map.0.wave]]   # wave 6, 7 monsters, 130 hp, 14 coins + boss 30
+[[map.0.wave]]   # wave 6
 monsters = { m0 = 1, m1 = 1, m2 = 1, m3 = 2, m4 = 2, b0 = 1 }
 
-# map1: drafted by tools/balance.py --draft from wave_count 8, wave_size [6, 17],
-# monster_share [36, 25, 18, 12, 9], first_wave [1, 2, 3, 5, 6]
+# map1 waves
 
-[[map.1.wave]]   # wave 1, 6 monsters, 30 hp, 6 coins
+[[map.1.wave]]   # wave 1
 monsters = { m0 = 6 }
 
-[[map.1.wave]]   # wave 2, 8 monsters, 55 hp, 8 coins
+[[map.1.wave]]   # wave 2
 monsters = { m0 = 5, m1 = 3 }
 
-[[map.1.wave]]   # wave 3, 9 monsters, 80 hp, 11 coins
+[[map.1.wave]]   # wave 3
 monsters = { m0 = 4, m1 = 3, m2 = 2 }
 
-[[map.1.wave]]   # wave 4, 11 monsters, 105 hp, 14 coins
+[[map.1.wave]]   # wave 4
 monsters = { m0 = 4, m1 = 4, m2 = 3 }
 
-[[map.1.wave]]   # wave 5, 12 monsters, 135 hp, 17 coins
+[[map.1.wave]]   # wave 5
 monsters = { m0 = 4, m1 = 3, m2 = 3, m3 = 2 }
 
-[[map.1.wave]]   # wave 6, 14 monsters, 210 hp, 24 coins
+[[map.1.wave]]   # wave 6
 monsters = { m0 = 3, m1 = 3, m2 = 3, m3 = 3, m4 = 2 }
 
-[[map.1.wave]]   # wave 7, 15 monsters, 240 hp, 27 coins
+[[map.1.wave]]   # wave 7
 monsters = { m0 = 3, m1 = 3, m2 = 3, m3 = 3, m4 = 3 }
 
-[[map.1.wave]]   # wave 8, 17 monsters, 290 hp, 32 coins + boss 50
+[[map.1.wave]]   # wave 8
 monsters = { m0 = 3, m1 = 3, m2 = 3, m3 = 4, m4 = 4, b1 = 1 }
 
-# map2: drafted by tools/balance.py --draft from wave_count 10, wave_size [10, 36],
-# monster_share [39, 26, 17, 11, 7], first_wave [1, 2, 4, 6, 8]
+# map2 waves
 
-[[map.2.wave]]   # wave 1, 10 monsters, 50 hp, 10 coins
+[[map.2.wave]]   # wave 1
 monsters = { m0 = 10 }
 
-[[map.2.wave]]   # wave 2, 13 monsters, 85 hp, 13 coins
+[[map.2.wave]]   # wave 2
 monsters = { m0 = 9, m1 = 4 }
 
-[[map.2.wave]]   # wave 3, 16 monsters, 110 hp, 16 coins
+[[map.2.wave]]   # wave 3
 monsters = { m0 = 10, m1 = 6 }
 
-[[map.2.wave]]   # wave 4, 19 monsters, 160 hp, 22 coins
+[[map.2.wave]]   # wave 4
 monsters = { m0 = 9, m1 = 7, m2 = 3 }
 
-[[map.2.wave]]   # wave 5, 22 monsters, 195 hp, 27 coins
+[[map.2.wave]]   # wave 5
 monsters = { m0 = 10, m1 = 7, m2 = 5 }
 
-[[map.2.wave]]   # wave 6, 24 monsters, 250 hp, 32 coins
+[[map.2.wave]]   # wave 6
 monsters = { m0 = 9, m1 = 7, m2 = 5, m3 = 3 }
 
-[[map.2.wave]]   # wave 7, 27 monsters, 305 hp, 38 coins
+[[map.2.wave]]   # wave 7
 monsters = { m0 = 9, m1 = 7, m2 = 6, m3 = 5 }
 
-[[map.2.wave]]   # wave 8, 30 monsters, 410 hp, 48 coins
+[[map.2.wave]]   # wave 8
 monsters = { m0 = 8, m1 = 7, m2 = 6, m3 = 6, m4 = 3 }
 
-[[map.2.wave]]   # wave 9, 33 monsters, 485 hp, 56 coins
+[[map.2.wave]]   # wave 9
 monsters = { m0 = 8, m1 = 7, m2 = 7, m3 = 6, m4 = 5 }
 
-[[map.2.wave]]   # wave 10, 36 monsters, 565 hp, 64 coins + boss 70
+[[map.2.wave]]   # wave 10
 monsters = { m0 = 8, m1 = 7, m2 = 7, m3 = 7, m4 = 7, b2 = 1 }
 
-# map3: drafted by tools/balance.py --draft from wave_count 12, wave_size [5, 16],
-# monster_share [52, 26, 13, 6, 3], first_wave [1, 2, 4, 6, 9]
+# map3 waves
 
-[[map.3.wave]]   # wave 1, 5 monsters, 25 hp, 5 coins
+[[map.3.wave]]   # wave 1
 monsters = { m0 = 5 }
 
-[[map.3.wave]]   # wave 2, 6 monsters, 35 hp, 6 coins
+[[map.3.wave]]   # wave 2
 monsters = { m0 = 5, m1 = 1 }
 
-[[map.3.wave]]   # wave 3, 7 monsters, 45 hp, 7 coins
+[[map.3.wave]]   # wave 3
 monsters = { m0 = 5, m1 = 2 }
 
-[[map.3.wave]]   # wave 4, 8 monsters, 60 hp, 9 coins
+[[map.3.wave]]   # wave 4
 monsters = { m0 = 5, m1 = 2, m2 = 1 }
 
-[[map.3.wave]]   # wave 5, 9 monsters, 70 hp, 10 coins
+[[map.3.wave]]   # wave 5
 monsters = { m0 = 5, m1 = 3, m2 = 1 }
 
-[[map.3.wave]]   # wave 6, 10 monsters, 85 hp, 12 coins
+[[map.3.wave]]   # wave 6
 monsters = { m0 = 5, m1 = 3, m2 = 2 }
 
-[[map.3.wave]]   # wave 7, 11 monsters, 105 hp, 14 coins
+[[map.3.wave]]   # wave 7
 monsters = { m0 = 5, m1 = 3, m2 = 2, m3 = 1 }
 
-[[map.3.wave]]   # wave 8, 12 monsters, 110 hp, 15 coins
+[[map.3.wave]]   # wave 8
 monsters = { m0 = 6, m1 = 3, m2 = 2, m3 = 1 }
 
-[[map.3.wave]]   # wave 9, 13 monsters, 120 hp, 16 coins
+[[map.3.wave]]   # wave 9
 monsters = { m0 = 6, m1 = 4, m2 = 2, m3 = 1 }
 
-[[map.3.wave]]   # wave 10, 14 monsters, 150 hp, 19 coins
+[[map.3.wave]]   # wave 10
 monsters = { m0 = 6, m1 = 4, m2 = 2, m3 = 1, m4 = 1 }
 
-[[map.3.wave]]   # wave 11, 15 monsters, 170 hp, 21 coins
+[[map.3.wave]]   # wave 11
 monsters = { m0 = 6, m1 = 4, m2 = 2, m3 = 2, m4 = 1 }
 
-[[map.3.wave]]   # wave 12, 16 monsters, 185 hp, 23 coins + boss 100
+[[map.3.wave]]   # wave 12
 monsters = { m0 = 6, m1 = 4, m2 = 3, m3 = 2, m4 = 1, b3 = 1 }