Title menu background: an endless battle at a bridge over an underground river

- dungeon creatures against knights, balanced reinforcements for the weaker side
- towers on both banks; heavy units go for them, destroyed towers are rebuilt after 25 s
- the camera slowly circles the bridge; battle sounds stay muted; the demo is never saved

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-03 15:51:35 +01:00
1 parent d06ce2edb5
commit f359671dac
3 files changed
+351 -16

No files matched your search

+12 -2
View File
@@ -3,6 +3,7 @@
mod audio;
mod campaign;
mod cloud;
mod demo;
mod dwarves;
mod fortress;
mod game;
@@ -374,7 +375,8 @@ async fn main() {
menu.has_autosave = platform::storage_get(save::AUTOSAVE_KEY).is_some();
let seed = (miniquad::date::now() * 1000.0) as u32 | 1;
let (game, cam) = new_game(seed, &settings);
// behind the title menu: the endless bridge battle
let (game, cam) = Game::new_demo(seed);
let mut app = App { game, cam, settings, seed, status: None, recorded: false };
menu.progress = platform::storage_get(PROGRESS_KEY).and_then(|s| serde_json::from_str(&s).ok()).unwrap_or_default();
app.game.hints = app.settings.hints;
@@ -814,6 +816,8 @@ async fn main() {
menu.has_autosave = true;
}
menu.page = Some(Page::Title);
app.seed = next_seed(app.seed);
(app.game, app.cam) = Game::new_demo(app.seed);
}
MenuAction::None | MenuAction::Consumed => {}
}
@@ -948,7 +952,13 @@ async fn main() {
app.game.hints = app.settings.hints;
}
// ---------------- update (the world stands still while menus or dialogs are open)
// ---------------- update (the world stands still while menus or dialogs are open;
// the bridge battle behind the title menu goes on, the camera slowly circles it)
if app.game.demo.is_some() && !playing {
app.game.update(dt);
app.cam.yaw += dt * 0.03;
app.game.events.retain(|ev| ev.pos.is_none());
}
if playing {
for _ in 0..(app.settings.game_speed.round().max(1.0) as usize) {
app.game.update(dt);