make wasm full-game web build wears the playground code-panel shell (shell.html) instead of shell_game.html #384
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#384
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?
Summary
The
make wasmbuild (build-emscripten/, whatmake serveserves and what the releaseMcRogueFace-<ver>-WASM.zipis packaged from) bundles the full game (src/scripts/game.py= Crypt of Sokoban) but renders it insidesrc/shell.html— the playground shell, which has a CodeMirror editor / Run button / a default snippet. So the "full game for web" shows the game running behind an interactive Python code panel it should not have.Root cause
Two independent CMake options:
MCRF_PLAYGROUNDselects scripts (CMakeLists.txt:451): playground →src/scripts_playground, else full gamesrc/scripts.MCRF_GAME_SHELLselects the shell HTML (CMakeLists.txt:455): ON →shell_game.html(no panel), OFF (default) →shell.html(code panel).The
make wasmtarget sets neitherMCRF_PLAYGROUNDnorMCRF_GAME_SHELL, so it gets full-game scripts and the defaultshell.html(code panel).make wasm-gameis a near-duplicate that does set-DMCRF_GAME_SHELL=ONand is correct, butserve/release usebuild-emscripten(fromwasm), notbuild-wasm-game.Verified:
build-emscripten/mcrogueface.datacontains the Sokoban scripts;shell.htmlcontainsCodeMirror/<textarea>/runCodewhileshell_game.htmlcontains none of them.Blast radius
make serve(local) → game + code panel.dist/McRogueFace-<ver>-WASM.zip(release,Makefile:567-569zipsbuild-emscripten) → shipped WASM game carries the code panel. 0.2.8 is affected./playground/— it is built frommake playground(MCRF_PLAYGROUND=ON), bundlesPlaygroundScene/scripts_playground(not game.py), and correctly has the code panel. So #382 snippet-links target a clean playground.Fix
Add
-DMCRF_GAME_SHELL=ONto themake wasmtarget sobuild-emscriptenis a clean full-game build (game.py +shell_game.html, no panel). This makeswasmandwasm-gameidentical — collapse the duplication (alias or dropwasm-game) to prevent the two drifting again.Note: the wasm targets only run cmake when
build-<dir>/Makefileis absent, so an existingbuild-emscripten/must be cleaned (make clean-wasm) before the flag takes effect.Sibling context: #382 (playground snippet-links) — this is the "deploying the playground" adjacent build-hygiene fix.