Skip to content

Add Civ Lite audio controls and cues#57

Merged
leocagli merged 4 commits into
Bitcoindefi:mainfrom
YfengJ:codex/civ-audio-25
Jun 30, 2026
Merged

Add Civ Lite audio controls and cues#57
leocagli merged 4 commits into
Bitcoindefi:mainfrom
YfengJ:codex/civ-audio-25

Conversation

@YfengJ

@YfengJ YfengJ commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a lazy Web Audio manager for Civ Lite with persisted master/music/SFX settings.
  • Add sidebar controls for mute, theme selection, and volume sliders.
  • Map gameplay actions to procedural SFX for click, selection, movement, attacks, building, end turn, victory, and defeat.

Validation

  • node --test demo/civ-lite/audio-model.test.mjs
  • node --check demo/civ-lite/audio-model.js
  • node --check demo/civ-lite/game.js
  • node --check demo/civ-lite/sprites.js
  • git diff --check
  • Playwright smoke on http://127.0.0.1:4196/demo/civ-lite/: audio controls rendered, mute/theme/volume controls responded, localStorage persisted volume, canvas pixel sample was non-empty.

Closes #25

@YfengJ

YfengJ commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

CI note: the failing Build Godot Web export job is stopping at the existing Godot export preset configuration error: Cannot export project with preset Web due to configuration errors. This PR only changes demo/civ-lite JS/HTML/CSS and adds a local Node test for the audio model. Local validation passed: node --test demo/civ-lite/audio-model.test.mjs; node --check demo/civ-lite/audio-model.js; node --check demo/civ-lite/game.js; node --check demo/civ-lite/sprites.js; git diff --check; and a Playwright smoke test for the Civ Lite page, audio controls, localStorage persistence, and non-empty canvas rendering.

@leocagli leocagli merged commit c1aa2b8 into Bitcoindefi:main Jun 30, 2026
1 check passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audio: música y efectos de sonido

2 participants