Add vertical tower_climb platformer (replaces horizontal platformer)#56
Merged
Conversation
Introduces platformer.py, a hardware-scrolled side-scroller built only from the four core pydisplay libraries (displaysys, graphics, eventsys, multimer). Uses rotation=90 and vscsad() like bmp565_scroll_sprite so vertical scroll becomes horizontal on ILI9341 displays. Features procedural parallax sky, beveled tile platforms, streamed runner sprites, enemies, coins, and particle effects. Registers the example in the test manifest and examples package. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
Match the native portrait resolution used by ILI9341 hardware board configs. Use scale=2.0 on desktop so the pygame window remains usable at logical 240×320 (apps like platformer.py set rotation=90 for 320×240 landscape). Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
Scratch platformer.py (hardware vscsad + rotation=90) in favor of a 1980s-inspired vertical scroller using software camera scrolling that works on PGDisplay and SDLDisplay. - tower_climb.py: climb a magical tree, smash ice, dodge falling hazards - Scalable layout from 320×480 reference to taller/wider panels - RGB565 assets (climber, tower_tiles, tower_bg) + gen_tower_assets.py - board_config.py set to 320×480 portrait Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
- Splash at launch with controls and objectives (skipped on replay and in test mode) - Life-lost screen waits for input before continuing - Game over / win screen waits for input to replay - Climber BMP uses magenta transparency key with blit_transparent - Player spawns on ground; test mode auto-skips UI waits Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
- Landing now only considers platforms the feet cross this frame, fixing fall-through when branches overlap horizontally above the ground. - Snap player to the ground platform on spawn and respawn; skip gravity while grounded and clear jump buffer on respawn. - Unsubscribe broker auto-refresh during the game loop to stop double show() flicker; restore on exit. - Improve recording script window focus and climb input pattern. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
Set TOWER_CLIMB_TRACE to a JSONL path to record per-frame player coordinates, hitbox, nearby platforms, x-collision blocks, input events, landings, and life-loss reasons. Recording script enables trace automatically. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
Trace analysis revealed and fixed: - Grounded bobbing (_land clearing on_ground each frame) - Side collision against overhead branches (_platform_supports_feet) - Jump-up landing onto platforms above (land_up path) - Duplicate landing snaps while standing still - Side resolve while jumping upward past platforms Gameplay: tighter platform spacing, reduced hazards, summit win on leaf platform or goal height. Added TOWER_CLIMB_BOT playtest tool (tools/tower_climb_playtest.py) verified to reach summit. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
xdotool keys do not reach the pygame window in this VNC environment, so recordings showed a frozen splash frame. Recording now sets TOWER_CLIMB_RECORD=1 to auto-play via the climb bot and loop rounds until capture finishes. Window geometry comes from xwininfo -id. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
x11grab at 24fps mostly captured duplicate frames while pygame rendered slowly, producing a video that looked like a few seconds of motion. Pipe each presented frame to ffmpeg instead (TOWER_CLIMB_VIDEO) so every game frame becomes one encoded frame at a fixed playback rate. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
The follow camera was clamped to zero, so once the player rose above ANCHOR_Y the world never moved on screen. Allow negative camera values and cap at the tower crown instead. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
Introduce FFmpegFrameRecorder and DisplayDriver hooks for attaching an ffmpeg pipe at show() time. Only PGDisplay exports frames today (logical _buffer as RGB24); other backends keep the base NotImplementedError. tower_climb now uses display_drv.open_frame_recorder() instead of a game-specific pygame window grabber. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
- DIFFICULTY constant (developer-only, top of tower_climb.py) drives hazard spacing, spawn period, and fall speed - Playtest tails the JSONL trace live, prints climb progress each second, and fails fast on stall instead of waiting for a long timeout - Double-height tree with leafy crown, tree terminology, and branch layout tuned so the bot can complete the climb Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
Size the completion panel from its line count and anchor it below the HUD so the leafy crown stays visible behind the TREE TOP message. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
Push gen_tower_assets.py with shaded climber sprites, organic bark and branch tiles, faceted ice/gem/debris, and a layered parallax sky. BMP dimensions are unchanged (128x120, 128x64, 320x4800). Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
- Cloud, leaf, gem, and spike tiles use magenta transparency - Summit cloud puffs spread wider above the crown - Replace yellow blob with a rayed sun - Keep the climber sprite visible on the TREE TOP screen Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
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.
Summit visual fixes
Addresses feedback on foreground tiles and the win screen:
T_LEAF,T_GEM,T_SPIKE, andT_CLOUDblit withblit_transparent(magenta key) so clouds and canopy details no longer show blocky solid backgrounds.SUMMIT_DECOSuses nine cloud puffs spread wider around the crown instead of a tight cluster at the tree top._draw_sun()draws a rayed morning sun above and to the right of the crown (replaces the ambiguous yellow rectangle).draw_end()keeps the climber sprite visible whenwon=True; the compact top banner no longer covers the player.Verification
/opt/cursor/artifacts/tower-climb-bot-win.mp4