annotate doc/sound.md @ 5:67bf3c505145

adjusted map0 mask
author ark
date 2026-10-18 22:50 +0200
parents 2d46729a022e
children 910b26feca76
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 | |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
32 | tower upgraded | tower_upgraded | not in the game yet |
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
33 | tower sold | tower_sold | not in the game yet |
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
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
62 - the build embeds art/sounds/ as base64 in game/data/sounds.js. see
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
4
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
65 browsers only play sound after the first user interaction. for now that is
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
66 the first tap anywhere on the game; later the first tap on the title screen.
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
67
4
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
68 sound can be switched off; the setting is stored with the other settings. for
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
69 now the switch is the enabled setting in [sound]; the game has no button for
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
70 it yet.