Skip to content

Add vertical tower_climb platformer (replaces horizontal platformer)#56

Merged
cursor[bot] merged 16 commits into
mainfrom
cursor/platformer-scroll-8699
Jul 7, 2026
Merged

Add vertical tower_climb platformer (replaces horizontal platformer)#56
cursor[bot] merged 16 commits into
mainfrom
cursor/platformer-scroll-8699

Conversation

@bdbarnett

@bdbarnett bdbarnett commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summit visual fixes

Addresses feedback on foreground tiles and the win screen:

  • Transparent foreground tilesT_LEAF, T_GEM, T_SPIKE, and T_CLOUD blit with blit_transparent (magenta key) so clouds and canopy details no longer show blocky solid backgrounds.
  • Cloud spacingSUMMIT_DECOS uses nine cloud puffs spread wider around the crown instead of a tight cluster at the tree top.
  • Identifiable sun_draw_sun() draws a rayed morning sun above and to the right of the crown (replaces the ambiguous yellow rectangle).
  • Climber on windraw_end() keeps the climber sprite visible when won=True; the compact top banner no longer covers the player.

Verification

  • Headless playtest: bot reaches tree top in ~119 frames
  • Win recording: /opt/cursor/artifacts/tower-climb-bot-win.mp4
Open in Web Open in Cursor 

cursoragent and others added 3 commits July 7, 2026 14:48
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>
@cursor cursor Bot changed the title Add side-scrolling platformer example for ILI9341 landscape Add vertical tower_climb platformer (replaces horizontal platformer) Jul 7, 2026
cursoragent and others added 13 commits July 7, 2026 15:30
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>
@cursor cursor Bot merged commit 69f37ea into main Jul 7, 2026
1 of 3 checks passed
@bdbarnett bdbarnett deleted the cursor/platformer-scroll-8699 branch July 8, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants