diff doc/architecture.md @ 8:2c4fed8baed9

art update, persistent sound setting, tower selling as double action
author ark
date 2026-10-19 13:37 +0200
parents 910b26feca76
children 53f015966118
line wrap: on
line diff
--- a/doc/architecture.md	Mon Oct 19 11:50:24 2026 +0200
+++ b/doc/architecture.md	Mon Oct 19 13:37:52 2026 +0200
@@ -93,14 +93,17 @@
 built-in toml reader) and pillow. numpy is optional, if the pure python image
 steps turn out too slow.
 
-tools/cut_sheet.py and tools/cut_sounds.py are run by hand and write to art/.
+tools/cut_sheet.py, tools/cut_digits.py and tools/cut_sounds.py are run by
+hand and write to art/.
 cut_sounds.py also needs ffmpeg with mp3 support, so the build itself does not
 depend on it. see sound.md.
 
 steps:
 
-1. sprites: trim transparent edges, write to game/assets/. make the hp bar
-   variants: the empty part, and the blue bars for slowed monsters (art.md)
+1. sprites: trim transparent edges, write to game/assets/. this covers the
+   icons, buttons and screens, and the digits from art/digits/ as
+   digit_NAME_N. make the hp bar variants: the empty part, and the blue bars
+   for slowed monsters (art.md)
 2. tower levels: t0-t3 are level 1. split each t*p strip into four images,
    levels 2-5. fill the inside of the outline with white (flood fill from
    outside, everything not reached is inside), trim, write as t0_2..t0_5 and
@@ -194,6 +197,7 @@
     data/maps.js    generated map data
     data/sounds.js  generated sound data
     js/util.js      vector maths, random numbers, easing
+    js/storage.js   settings kept in the browser
     js/assets.js    image loading, sprite table
     js/audio.js     recorded sounds, placeholder beeps for the other events
     js/map.js       placement lookup, snapping, route sampling
@@ -229,14 +233,17 @@
   borders where the shapes differ
 - the canvas resolution follows the device pixel ratio, so drawings stay sharp
   on high-resolution screens
-- layout: top bar with coins, hearts, wave, countdown, pause and speed. the
+- layout: top bar with coins, hearts, wave, countdown, sound, speed and
+  pause. the
   tower shop sits on the right in landscape and at the bottom in portrait
 - buttons are at least 48 css pixels for touch
 
 input:
 
 - pointer events cover mouse and touch alike
-- nothing relies on hover; selection and confirmation are by tap
+- nothing relies on hover; selection and confirmation are by tap. with a
+  mouse, hover enlarges the screen buttons and shows the pointer cursor over
+  any button
 - the page blocks browser zoom and scroll gestures on the canvas
 
 placement:
@@ -252,10 +259,10 @@
 - nothing is stored for now. maps are played in order and a lost map goes
   back to the first map, so there is no progress to keep. a reload starts at
   the splash screen with a fresh game
-- once the game has settings, such as sound on or off, js/storage.js wraps
-  localStorage, and one entry holds them
+- settings, so far only sound on or off, are stored by js/storage.js. it
+  wraps localStorage, and one entry holds them
 - all access is wrapped so the game still runs when storage is unavailable,
-  for example in private browsing; progress is then not saved
+  for example in private browsing; settings are then not kept
 - the entry carries a version number for later format changes