A defeat sound when Maia offers to resign
Every sound set gets a Defeat sound, played when Maia offers to resign: the Lichess sets their own Defeat.ogg (sfx, piano, futuristic, nes — Enigmahack, AGPLv3+, unmodified), the Kenney sets a falling tone of «Interface Sounds» (CC0: clicks minimize_006, the pair of its checkmate maximize_006; wood minimize_008; glass minimize_004), leading silence trimmed and the peak matched to the set's checkmate sound. Sources in THIRD_PARTY_NOTICES.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5e7a588368
commit
53da355044
10 changed files with 25 additions and 6 deletions
|
|
@ -51,11 +51,14 @@ Downloaded unmodified (files renamed `wk.svg` → `wK.svg`) from https://github.
|
|||
"Interface Sounds" (https://kenney.nl, CC0 1.0): leading silence trimmed, loudness matched to the
|
||||
other sets, re-encoded as Ogg Vorbis.
|
||||
|
||||
| Set | Move | Capture | Check | Checkmate |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| wood | impactWood_light_002 | impactWood_heavy_002 | impactPlank_medium_002 | impactBell_heavy_001 |
|
||||
| glass | impactGlass_light_001 | impactGlass_heavy_001 | glass_002 | impactBell_heavy_000 |
|
||||
| clicks | click_002 | drop_002 | confirmation_001 | maximize_006 |
|
||||
| Set | Move | Capture | Check | Checkmate | Defeat |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| wood | impactWood_light_002 | impactWood_heavy_002 | impactPlank_medium_002 | impactBell_heavy_001 | minimize_008 |
|
||||
| glass | impactGlass_light_001 | impactGlass_heavy_001 | glass_002 | impactBell_heavy_000 | minimize_004 |
|
||||
| clicks | click_002 | drop_002 | confirmation_001 | maximize_006 | minimize_006 |
|
||||
|
||||
The Defeat sounds of the Lichess sets (`Defeat.ogg` of `public/sound/sfx`, `piano`,
|
||||
`futuristic`, `nes`, by Enigmahack, AGPLv3+) were downloaded unmodified on 2026-10-25.
|
||||
|
||||
Notes:
|
||||
- Lichess keeps a set's checkmate sound as a link to its check sound; ChessPenguin plays the check
|
||||
|
|
|
|||
BIN
apps/desktop/assets/sounds/clicks/Defeat.ogg
Normal file
BIN
apps/desktop/assets/sounds/clicks/Defeat.ogg
Normal file
Binary file not shown.
BIN
apps/desktop/assets/sounds/futuristic/Defeat.ogg
Normal file
BIN
apps/desktop/assets/sounds/futuristic/Defeat.ogg
Normal file
Binary file not shown.
BIN
apps/desktop/assets/sounds/glass/Defeat.ogg
Normal file
BIN
apps/desktop/assets/sounds/glass/Defeat.ogg
Normal file
Binary file not shown.
BIN
apps/desktop/assets/sounds/nes/Defeat.ogg
Normal file
BIN
apps/desktop/assets/sounds/nes/Defeat.ogg
Normal file
Binary file not shown.
BIN
apps/desktop/assets/sounds/piano/Defeat.ogg
Normal file
BIN
apps/desktop/assets/sounds/piano/Defeat.ogg
Normal file
Binary file not shown.
BIN
apps/desktop/assets/sounds/sfx/Defeat.ogg
Normal file
BIN
apps/desktop/assets/sounds/sfx/Defeat.ogg
Normal file
Binary file not shown.
BIN
apps/desktop/assets/sounds/wood/Defeat.ogg
Normal file
BIN
apps/desktop/assets/sounds/wood/Defeat.ogg
Normal file
Binary file not shown.
|
|
@ -556,6 +556,8 @@ pub enum Sound {
|
|||
Capture,
|
||||
Check,
|
||||
Checkmate,
|
||||
/// A game lost — here: Maia offers to resign.
|
||||
Defeat,
|
||||
}
|
||||
|
||||
pub fn sound_bytes(set: SoundSet, sound: Sound) -> &'static [u8] {
|
||||
|
|
@ -590,6 +592,13 @@ pub fn sound_bytes(set: SoundSet, sound: Sound) -> &'static [u8] {
|
|||
(SoundSet::Clicks, Sound::Capture) => s!("clicks", "Capture"),
|
||||
(SoundSet::Clicks, Sound::Check) => s!("clicks", "Check"),
|
||||
(SoundSet::Clicks, Sound::Checkmate) => s!("clicks", "Checkmate"),
|
||||
(SoundSet::Sfx, Sound::Defeat) => s!("sfx", "Defeat"),
|
||||
(SoundSet::Piano, Sound::Defeat) => s!("piano", "Defeat"),
|
||||
(SoundSet::Futuristic, Sound::Defeat) => s!("futuristic", "Defeat"),
|
||||
(SoundSet::Nes, Sound::Defeat) => s!("nes", "Defeat"),
|
||||
(SoundSet::Wood, Sound::Defeat) => s!("wood", "Defeat"),
|
||||
(SoundSet::Glass, Sound::Defeat) => s!("glass", "Defeat"),
|
||||
(SoundSet::Clicks, Sound::Defeat) => s!("clicks", "Defeat"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -601,7 +610,13 @@ mod tests {
|
|||
fn every_sound_is_a_real_ogg_file() {
|
||||
// Lichess keeps some sounds as git symlinks; a copied link is a few bytes of text.
|
||||
for set in SoundSet::ALL {
|
||||
for s in [Sound::Move, Sound::Capture, Sound::Check, Sound::Checkmate] {
|
||||
for s in [
|
||||
Sound::Move,
|
||||
Sound::Capture,
|
||||
Sound::Check,
|
||||
Sound::Checkmate,
|
||||
Sound::Defeat,
|
||||
] {
|
||||
let b = sound_bytes(set, s);
|
||||
assert!(b.starts_with(b"OggS") && b.len() > 1000, "{set:?} {s:?}");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2291,6 +2291,7 @@ impl GameView {
|
|||
s.opponent.forget();
|
||||
s.resign_offer = Some(std::time::Instant::now());
|
||||
self.scroll_to_cursor = true;
|
||||
actions.push(GameAction::Sound(Sound::Defeat));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue