Most games already track a score internally but throw it away when you close the modal. We can persist per-game high scores on the launcher side.
Approach
- Define a tiny postMessage protocol: games
postMessage({type:'score', value:N}).
- The launcher catches it, stores
localStorage["hs:<slug>"] = max(prev, N).
- Show the high score under the title in the modal bar.
- Document the protocol in CONTRIBUTING.md so new games can opt in.
Existing games keep working unchanged.
Most games already track a score internally but throw it away when you close the modal. We can persist per-game high scores on the launcher side.
Approach
postMessage({type:'score', value:N}).localStorage["hs:<slug>"] = max(prev, N).Existing games keep working unchanged.