diff doc/sound.md @ 0:7af9dd4e2595

initial art and design/planning docs
author ark
date 2026-10-18 01:26 +0200
parents
children 2d46729a022e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/sound.md	Sun Oct 18 01:26:39 2026 +0200
@@ -0,0 +1,49 @@
+sound
+-----
+
+the first version uses placeholder beeps, generated in the browser (web audio
+oscillator, a few notes each). voice recordings replace them later, one event
+at a time.
+
+
+events
+------
+
+| event                | notes |
+|----------------------|-------|
+| t0 attack            | |
+| t1 shot              | |
+| t2 shot              | |
+| t3 shot              | |
+| monster hit          | frequent; keep short or play only some of them |
+| monster dies         | |
+| boss appears         | |
+| boss dies            | |
+| coins arrive         | at most one per short interval |
+| monster reaches exit | a heart is lost |
+| wave starts          | |
+| early start bonus    | |
+| tower built          | |
+| tower upgraded       | |
+| tower sold           | |
+| placement refused    | no legal spot within reach |
+| button tap           | |
+| map won              | |
+| map lost             | |
+
+several recordings per event are allowed; the game picks one at random.
+
+
+recordings
+----------
+
+- recorded on any device, supplied in any common format
+- the build trims silence, evens out volume, converts to one format that
+  desktop browsers and tablets (including safari) play, and embeds the result
+  as base64 in a javascript file. see architecture.md for why
+- named after the event, with a number for variants
+
+browsers only play sound after the first user interaction. the first tap on
+the title screen unlocks audio.
+
+sound can be switched off; the setting is stored with the other settings.