comparison doc/architecture.md @ 32:85d23328a215 0.10.0

added intro music, logic for browser audio triggering on splash screen
author ark
date 2026-10-20 18:39 +0200
parents 75deda08db90
children a464bd43b76c
comparison
equal deleted inserted replaced
31:d1ae50439686 32:85d23328a215
74 74
75 -w sets the viewport, -s the wait after loading. the game state is not 75 -w sets the viewport, -s the wait after loading. the game state is not
76 reachable from outside, so other screens are reached by tapping: -J runs 76 reachable from outside, so other screens are reached by tapping: -J runs
77 javascript after the wait, and -S waits again before capturing. a pointer 77 javascript after the wait, and -S waits again before capturing. a pointer
78 event sent to the canvas counts as a tap at that position in css pixels. 78 event sent to the canvas counts as a tap at that position in css pixels.
79 this taps the play button on the splash screen at 1024 x 768: 79 a fresh firefox profile has no stored settings, so the splash screen first
80 80 shows the sound button over the play button (sound.md). this taps it, and
81 ff_screenshot -w 1024,768 -s 2 -S 3 -J 'document.getElementById("game") 81 the play button a second later, at 1024 x 768:
82 .dispatchEvent(new PointerEvent("pointerdown", 82
83 {clientX: 497, clientY: 560, bubbles: true}))' \ 83 ff_screenshot -w 1024,768 -s 2 -S 3 -J 'function tap() {
84 document.getElementById("game").dispatchEvent(new PointerEvent(
85 "pointerdown", {clientX: 497, clientY: 560, bubbles: true})) }
86 tap(); setTimeout(tap, 1000)' \
84 file://$PWD/www/index.html temp/play.png 87 file://$PWD/www/index.html temp/play.png
85 88
86 `ff_screenshot -h` lists the other options. 89 `ff_screenshot -h` lists the other options.
87 90
88 91
289 data/maps.js generated map data 292 data/maps.js generated map data
290 data/sounds.js generated sound data 293 data/sounds.js generated sound data
291 js/util.js vector maths, random numbers, easing 294 js/util.js vector maths, random numbers, easing
292 js/storage.js settings kept in the browser 295 js/storage.js settings kept in the browser
293 js/assets.js image loading, sprite table 296 js/assets.js image loading, sprite table
294 js/audio.js recorded sounds, placeholder beeps for the other events 297 js/audio.js recorded sounds, placeholder beeps for the other events,
298 splash screen music
295 js/map.js placement lookup, snapping, route sampling 299 js/map.js placement lookup, snapping, route sampling
296 js/monster.js movement along a route, hops, slow, hp 300 js/monster.js movement along a route, hops, slow, hp
297 js/tower.js targeting, attacks, upgrade, sell 301 js/tower.js targeting, attacks, upgrade, sell
298 js/projectile.js 302 js/projectile.js
299 js/wave.js wave timing, countdown, early start bonus 303 js/wave.js wave timing, countdown, early start bonus