Skip to content

Add Wapuu platformer easter egg#3270

Merged
wojtekn merged 50 commits intotrunkfrom
easter-egg-wapuu-platformer
Apr 30, 2026
Merged

Add Wapuu platformer easter egg#3270
wojtekn merged 50 commits intotrunkfrom
easter-egg-wapuu-platformer

Conversation

@wojtekn
Copy link
Copy Markdown
Contributor

@wojtekn wojtekn commented Apr 28, 2026

Related issues

  • Related to: RSM-1289

How AI was used in this PR

Built entirely with Claude Code. Sprite art created via OpenAI image generation, then manually edited in Preview → Unfaker → Piskelapp pipeline (documented in SPRITES.md). Code was written and iterated through conversation, with extensive testing and debugging.

Proposed Changes

Adds a hidden Mario-style platformer Easter egg accessible via:

  • Konami code (↑↑↓↓←→←→BA) on keyboard
  • Triple-click the settings gear icon in the top bar

Features:

  • Wapuu as the player character with idle/walk sprites
  • Two enemy types: Gutenberg block (1 stomp) and Mguy boss (2 stomps)
  • Pit hazards filled with animated water (enemies turn around before pits)
  • Two parallax background layers (far + near)
  • Score system persisted to app.json, displayed in Settings → Account with a progress bar and link to wapuu.studio
  • Web Audio API synthesized sound effects (no asset files)
  • Fixed 60fps timestep (display-refresh-rate independent)
  • All code under src/modules/wapuu-world/

Testing Instructions

  1. npm start
  2. Press ↑↑↓↓←→←→BA (Konami code) — game overlay appears
  3. Arrow keys / WASD to move, Up / W / Space to jump
  4. Stomp enemies, collect coins, reach the flag
  5. Alternatively: triple-click the settings gear icon in the top bar
  6. Check Settings → Account for Wapuu score bar after winning

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

Proof of Concept — this is an AI-assisted feature built for fun. Architecture, polish, and test coverage should be reviewed before any merge consideration.

🤖 Generated with Claude Code

wojtekn and others added 8 commits April 28, 2026 11:52
Hidden mini-game accessible via Konami code (↑↑↓↓←→←→BA) or triple-clicking
the settings gear icon. Features a canvas-based platformer with Wapuu as the
player character, enemies, collectibles, pits, and a goal flag. Best score is
persisted to app.json and displayed in Settings → Account.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Synthesized 8-bit-style sounds for jump, collect, stomp, hit, die, and win
events using the Web Audio API. No external files needed — sounds are generated
programmatically and can be swapped for real audio files later.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d-timestep game loop

- Add wapuu player sprites (idle/walk), Gutenberg enemy sprite, coin v2
- Add parallax far/near background layers with zoom and bottom-alignment
- Add animated water in pits, lowered surface by 1/3
- Fix game loop to fixed 60fps timestep (independent of display refresh rate)
- Fix tile gap rendering with floored cameraX and 1px tile overlap
- Fix player animation: idle/walk sprite switching based on vx, no oscillation
- Add idleTimer field to Player entity
- Enemy sprites flip horizontally based on movement direction

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents the OpenAI → Unfaker → Piskel workflow for generating pixel art sprites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… 32px

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move src/components/easter-egg/ → src/modules/wapuu-world/
- Move src/assets/easter-egg/ → src/modules/wapuu-world/assets/
- Move src/hooks/use-konami-code.ts → src/modules/wapuu-world/use-konami-code.ts
- Rename EasterEggGame.tsx → wapuu-world-game.tsx, export WapuuWorldGame
- Rename Redux state/actions: isEasterEggOpen → isWapuuWorldOpen, openEasterEgg → openWapuuWorld, closeEasterEgg → closeWapuuWorld
- Update all imports in app.tsx and top-bar.tsx

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wojtekn wojtekn changed the title Wapuu World: hidden platformer Easter egg Add Wapuu platformer easter egg Apr 28, 2026
wojtekn and others added 7 commits April 28, 2026 17:43
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 90s countdown shown in HUD (turns orange at ≤30s, red at ≤10s)
- Timeout triggers game over
- Remaining seconds × 10 added to win score (max score now 2750)
- Start screen shown on open with 3s auto-start countdown
- Enemies animate in background during start screen
- Press Space or Enter to skip countdown

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove emoji from canvas title to fix centering (monospace emoji width is inconsistent)
- Match death screen layout and overlay opacity
- Auto-start delay changed from 3s to 5s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wojtekn wojtekn marked this pull request as ready for review April 29, 2026 11:30
@wojtekn wojtekn requested a review from sejas April 29, 2026 14:25
Copy link
Copy Markdown
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I tested it and works as expected, or even funnier than I expected.
I just have a small concern. When pressing the settings button it feels the modal opens with a delay. Let's change the settings trigger to be a long press of 5-10 seconds.

Her's my score:
Image

@wojtekn
Copy link
Copy Markdown
Contributor Author

wojtekn commented Apr 29, 2026

Looks good. I tested it and works as expected, or even funnier than I expected.

Ha, thanks!

I just have a small concern. When pressing the settings button it feels the modal opens with a delay. Let's change the settings trigger to be a long press of 5-10 seconds.

I see that now, I tried with other elements, but with the sidebar toggle, it didn't work great. I reduced it to 200ms for now.

@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented Apr 29, 2026

📊 Performance Test Results

Comparing 30d1c45 vs trunk

app-size

Metric trunk 30d1c45 Diff Change
App Size (Mac) 1507.60 MB 1510.66 MB +3.06 MB 🔴 0.2%

site-editor

Metric trunk 30d1c45 Diff Change
load 1465 ms 1761 ms +296 ms 🔴 20.2%

site-startup

Metric trunk 30d1c45 Diff Change
siteCreation 8081 ms 8087 ms +6 ms ⚪ 0.0%
siteStartup 4950 ms 4955 ms +5 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

Copy link
Copy Markdown
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it again and it works good. The settings button delay is much smaller.
I also created this PR for you to consider: #3287

  • It changes the three clicks by a long click. That way we can avoid adding any delay
  • It loads de sprite images only when the easter egg starts and it doesn't add any memory/time to loading the app or the settings modal.

@wojtekn
Copy link
Copy Markdown
Contributor Author

wojtekn commented Apr 30, 2026

@sejas, I also tested and built the artifact on Mac and Windows, and everything worked fine.

@wojtekn wojtekn merged commit 84c7b08 into trunk Apr 30, 2026
11 checks passed
@wojtekn wojtekn deleted the easter-egg-wapuu-platformer branch April 30, 2026 16:51
gcsecsey added a commit that referenced this pull request May 1, 2026
- `media-streamer.test.ts`: `RemoteSessionLogger`'s constructor signature
  changed in trunk (#3282) from `(logPath: string)` to
  `(options: RemoteSessionLoggerOptions)`. Update the five test
  call sites to use `{ logPath: '/dev/null' }`.
- `top-bar.tsx`: drop unused `useEffect`, `useRef`, `useAppDispatch`,
  and `openWapuuWorld` imports (leftover from #3270).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants