Platformer: character select + a hero portrait (Phase G)#68
Merged
Conversation
Press 1-5 to pick the hero skin (beige/green/pink/purple/yellow). gHeroSkin is one word the hero anim defs + the creation frame interpolate, so picking re-skins the whole character (idle/walk/jump/duck/climb/hurt/win) on a clean rebuild - the controller suppresses redundant anim replays, so a rebuild (pfLoadSheets already runs per build) is the reliable swap. The choice persists across levels and restarts. - pfPickHero (1-5 in rawKeyDown) maps the key to a skin and rebuilds; a no-op if it's already that skin. - A hud_player_<skin> PORTRAIT anchors the bottom-left status corner; the heart row shifts right of it. Rebuilt each level so it always shows the current hero. - The splash + ESC pause overlay gained the 1-5 hint; kPfUIVersion -> 10. All five skins carry the full 8-frame anim set. Example-side only; static gates clean, audit 0 findings. Needs an OXT pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X92APxUJUMue3bAzXiX9V2
7118239 to
cb69d64
Compare
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.
What
Phase G of the asset-expansion plan: character select + a hero portrait. The hero is no longer locked to the beige skin.
How it works
gHeroSkin). The skin is one word that the hero anim defs and the creation frame interpolate ("character_" & gHeroSkin & "_idle", etc.), so picking re-skins the whole character — idle / walk / jump / duck / climb / hurt / win.pfPickHero→pfStartGame): the Kit's player controller suppresses redundant anim replays (sPlayAnimNow), so redefining anims live would show a mixed state — a rebuild (andpfLoadSheetsalready runs per build) is the reliable swap.gLevelis unchanged, so you stay on the same level wearing the new skin.Portrait
hud_player_<skin>avatar anchors the bottom-left status corner, with the heart row shifted right of it — a tidy "avatar + health" cluster. Rebuilt each level so it always shows the current hero.Discoverability
kPfUIVersion→ 10, so saved stacks rebuild the pause overlay once).Notes
hud_player_helmet_*left unused — the plain portraits read cleaner at HUD scale.gHeroSkindefaults tobeigebefore any use.Verification
tools/check-livecodescript.py— PASStools/audit-platformer.py— 0 findings across 7 levels🤖 Generated with Claude Code
https://claude.ai/code/session_01X92APxUJUMue3bAzXiX9V2
Generated by Claude Code