annotate doc/sound.md @ 28:b0658e7fcee2

Added tag 0.9.1 for changeset 75deda08db90
author ark
date 2026-10-20 17:19 +0200
parents fe680946164b
children 85d23328a215
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
1 sound
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
2 -----
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
3
4
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
4 events with a voice recording play the recording. the others play
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
5 placeholder beeps, generated in the browser (web audio oscillator, a few notes
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
6 each), until a recording arrives.
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
7
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
8
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
9 events
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
10 ------
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
11
4
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
12 the event name is the name of its recordings and its entry in [sound.event]
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
13 in config/game.toml.
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
14
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
15 | event | name | notes |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
16 |----------------------|-------------------|-------|
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
17 | t0 attack | t0_attack | recorded, 4 variants |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
18 | t1 shot | t1_shot | recorded, 6 variants |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
19 | t2 shot | t2_shot | recorded, 4 variants |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
20 | t3 shot | t3_shot | recorded, 7 variants |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
21 | monster hit | monster_hit | frequent; keep short or play only some of them |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
22 | monster enters map | monster_enter | recorded, 3 variants. every monster for now; to playtest |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
23 | monster dies | monster_die | recorded, 4 variants |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
24 | monster reaches exit | monster_exit | recorded. a heart is lost |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
25 | boss appears | boss_enter | recorded |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
26 | boss reaches exit | boss_exit | recorded |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
27 | boss dies | boss_die | recorded |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
28 | coins arrive | coins_arrive | at most one per short interval |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
29 | wave starts | wave_start | |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
30 | early start bonus | early_bonus | |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
31 | tower built | tower_built | |
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
32 | tower upgraded | tower_upgraded | |
910b26feca76 full game flow
ark
parents: 4
diff changeset
33 | tower sold | tower_sold | |
4
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
34 | placement refused | placement_refused | no legal spot within reach |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
35 | button tap | button_tap | |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
36 | map won | map_won | recorded |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
37 | map lost | map_lost | recorded |
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
38
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
39 several recordings per event are allowed; the game picks one at random.
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
40
4
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
41 the map won sound waits until a boss or monster death sound still playing has
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
42 ended, and map lost waits for the last exit sound. the boss wave may not stay
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
43 the end of a map, so boss_die and map_won are separate sounds.
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
44
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
45 per event, the config sets a volume, an optional least time between two
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
46 plays (plays in between are dropped) and the placeholder beep.
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
47
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
48
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
49 recordings
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
50 ----------
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
51
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
52 - recorded on any device, supplied in any common format
4
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
53 - art/sound_sources/ holds the recordings as supplied, named after the event.
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
54 a recording may hold several variants with pauses between them
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
55 - tools/cut_sounds.py turns them into game sounds in art/sounds/. it is run
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
56 by hand after a recording changes, not by the build, because it needs
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
57 ffmpeg. it lists the number of variants per recording and splits those
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
58 recordings at their longest pauses, into NAME_1, NAME_2 and so on. it
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
59 trims silence, filters low rumble, fades the ends and brings every sound to
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
60 the same peak level. the output is mono mp3, which desktop browsers and
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
61 tablets (including safari) play
17
fe680946164b reorganised repo
ark
parents: 8
diff changeset
62 - the build embeds art/sounds/ as base64 in www/data/sounds.js. see
4
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
63 architecture.md for why
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
64
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
65 browsers only play sound after the first user interaction. the play button on
910b26feca76 full game flow
ark
parents: 4
diff changeset
66 the splash screen starts the sound.
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
67
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
68 the sound button in the top bar switches sound on and off. the choice is
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
69 stored in the browser (architecture.md, persistence). until the player first
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
70 uses it, the enabled setting in [sound] applies.