mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5161] Game music: persistent per-area and per-enemy-tier tracks, generated once and selected in play — not per-turn 30-second clips #2856
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2856
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Aug 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5161
Originally assigned to: @kolacheee on GitHub.
The problem, as it plays today: turn on Game music (an ElevenLabs audio connection with Music enabled, since #5146), start a game, and walk between a few locations. The scene analyzer writes a fresh free-text mood prompt as scenes change, and every new prompt generates a brand-new 30-second instrumental clip (
music_length_ms: 30_000is hardcoded in the game-audio route). The result: music that lurches to a different track every turn or two, 30-second loops that were never composed to loop, and a metered generation call for every distinct mood sentence the analyzer happens to phrase. That's a soundtrack for a slideshow, not a game.Try it yourself: enable Game music, play ~5 turns crossing two locations and starting one combat, and count the distinct clips in
game-assets/music/generated/— then listen to how often the music restarts.The redesign — persistent, context-bound tracks, selected rather than generated:
music_length_ms; response-size caps need raising accordingly), with prompts asking for loop-friendly instrumental beds. One 2–3 minute track per context beats six 30-second clips in every way, including cost.What this builds on (all merged): #5146 audio connections carry the per-game connection and the Music capability flag plus the per-game toggles; the game-audio route, the prompt-hash cache under
game-assets/music/generated/, the tag-scoring selector for the bundled library, and location-slug asset keying all exist. This issue is about when music generates (once per context, not per turn) and how it's chosen (selection from a stable library, not prompt churn).Origin: this replaces the design that #5145 was closed for — the per-turn mood-clip surfacing was rejected in favor of this model when audio connections (#5146) were chosen as the foundation.