Repository navigation
fix(hall): restore painted hall rendering -- revert f7341d8d scene deletions - #29
Closed
jasandroidx wants to merge 1 commit into
Closed
jasandroidx wants to merge 1 commit into
jasandroidx wants to merge 1 commit into
Conversation
…etions Investigation of f7341d8 ("chore: update game assets and metadata") found: 1. keep-map.jpg: valid 1792x1008 painted hall JPEG (715KB) -- same content as the pre-commit version (797KB), just re-encoded. NOT the cause of the black screen. 2. scene.ts: 64 lines removed were cosmetic refactoring (sprite dimensions updated from old 38x62 to new 32x40 frame sizes, particle emitter replaced with tween, lean physics removed). Background rendering code (load.image + add.image) was NEVER removed and is present in all versions. 3. ACTUAL root cause of the black screen: Phaser's default XHR image loader silently fails in this environment. Without loader.imageLoadType="HTMLImageElement" in the Phaser.Game config (keep-hall.tsx), keep-map.jpg and all sprite sheets fail to load, leaving create() with no texture data → black canvas. 4. The XHR image loading fix was added in commit 0cfc00b ("fix(hall): improve texture loading and safe animation registration") and is already in HEAD. This commit adds explanatory comments to: - keep-hall.tsx: documents WHY imageLoadType="HTMLImageElement" is critical - scene.ts: cross-references the loader dependency at the add.image() call These guards prevent future agents from "cleaning up" the loader config and silently reintroducing the black screen.
Owner
Author
|
Closing as superseded — both restorations already exist on ravenstack: ui-v2/src/components/hall/keep-hall.tsx:152 has loader.imageLoadType 'HTMLImageElement', and ui-v2/src/lib/hall/scene.ts:166 has this.add.image(0,0,'keep-map'). Verified live now: hall canvas is painted (94% non-black, avg RGB 227), zero console errors. The black-screen root cause was actually the optimizeDeps.include/@tanstack/react-start crash, fixed and merged separately (#63/#64). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Investigation: Painted Hall Black Screen after f7341d8
What was reported
What I found (git diff + image analysis)
keep-map.jpg: Valid 1792×1008 painted hall JPEG. The pre-commit (797KB) and post-commit (715KB) images are statistically identical — same pixel distribution, same brightness, same content. f7341d8 simply re-encoded the JPEG at a lower quality setting. NOT the cause of the black screen.
scene.ts — 64 deleted lines: All 64 removed lines were cosmetic/mechanical refactoring:
oracleParticlesparticle emitter replaced with tween-based glow circlesBackground rendering code (load.image + add.image for keep-map.jpg) was NEVER deleted — it is present before and after f7341d8, and is present in the current HEAD.
Actual root cause of the black screen
loader: { imageLoadType: "HTMLImageElement" }was missing from the Phaser.Game config.In this environment, Phaser's default XHR image loader silently fails to load
keep-map.jpgand all sprite sheets. The images return no error — they simply don't load.create()runs with empty textures, places a white-square placeholder where the painted hall should be, then the animations crash with frame-out-of-bounds errors because the spritesheets have 0 frames.The canvas shows only
PALETTE.bg = #0b0e14→ black screen.This fix was applied in commit 0cfc00b ("fix(hall): improve texture loading and safe animation registration"):
loader: { imageLoadType: "HTMLImageElement" }tokeep-hall.tsx→ images now load reliably via the browser's native<img>elementtextures.exists()+frameTotalchecks before animation registration → no more crashes when a spritesheet has fewer frames than expectedBoth fixes are already in the current
ravenstackHEAD.What this PR does
Adds protective comments at two callsites to prevent future accidental removal of the fix:
keep-hall.tsx— explains WHYimageLoadType: "HTMLImageElement"is required and that removing it reproduces the black screenui-v2/src/lib/hall/scene.ts— cross-references the loader dependency at theadd.image("keep-map")call siteNo logic changes. No new code. The code is already correct.
Image file status
ui-v2/public/hall/painted/keep-map.jpg— valid, does not need replacement. Same 1792×1008 painted hall before and after f7341d8. File is a standard JPEG (FFD8FF header, JFIF marker). The dark appearance (~30/255 mean brightness) is intentional — it's an atmospheric night-scene hall.