Skip to content

Add Block Stack app - #181

Open
jondkinney wants to merge 17 commits into
badger:mainfrom
jondkinney:add-block-stack
Open

jondkinney wants to merge 17 commits into
badger:mainfrom
jondkinney:add-block-stack

Conversation

@jondkinney

@jondkinney jondkinney commented Dec 2, 2026 •

Copy link
Copy Markdown

What does this PR do?

Adds Block Stack, an original falling-block puzzle app: fit shapes into a 10x20 well, clear rows, and the pace picks up every 10 lines. It has a ghost piece, wall kicks, a NEXT preview (toggleable), a saved best score, and a dimmed game-over overlay.

Type of change

  • New badge app

Badge app checklist

  • The app lives in badge/apps/<name>/ with __init__.py and a 24x24 icon.png
  • README.md starts with a one-sentence description, followed by usage and any hardware or network requirements
  • Uses the 2026 runtime globals (badge, screen, image, ...) and logical buttons such as BUTTON_SELECT
  • Movement and animation are frame-rate independent (badge.ticks_delta)
  • Tested on Universe 2026 badge hardware, including both orientations and the capacitive controls
  • Assets are in assets/, are PNG where possible, and are as small as practical
  • No secrets, tokens, or personal data are committed (badge/secrets.py stays empty)

Screenshots



How to use it

  • LEFT / RIGHT: move (hold to repeat)
  • Circle button: rotate clockwise
  • ENTER key / diamond pad (they share GPIO10): rotate clockwise when upright, counter-clockwise when upside down
  • UP: hard drop
  • DOWN: soft drop (bonus points; speed scales with level)
  • Right pill: start / pause. Left pill: toggle the NEXT preview.
  • Best score is saved. The title screen shows orientation-aware controls.

Licensing and intellectual property

  • I created all code and assets in this PR, or they are already available under an MIT-compatible license and I have credited them in the app README
  • This PR doesn't include third-party characters, logos, trademarks, or other IP, or the owner has agreed to its release under the MIT License
  • I agree that my contribution is licensed under this project's MIT License

Additional notes

Code, art and name are original. The game is in the classic falling-block genre (10x20 well, seven four-cell shapes), so reviewers should confirm that is acceptable under the IP guidance. I'm happy to change the palette, board size or piece set if needed. The screenshots are cropped from the browser simulator.

  • While paused: UP returns to the title, DOWN starts badge mode.

Badge mode

Press DOWN on the title (or while paused) for a self-playing, conversation-piece mode: the game plays at a human pace, restarts after each loss, and shows your name, title, company and @handle beside the well. LEFT/RIGHT toggles a LinkedIn QR code; either pill exits. It reads CONTACT_NAME, CONTACT_TITLE, CONTACT_COMPANY, CONTACT_LINKEDIN and GITHUB_USERNAME from the optional secrets.py (falling back to the cached GitHub profile). It never changes the saved best score. The same variables sit blank at the top of __init__.py for simulator testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 2, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The controls mishandle inverted drop directions, map pause to HOME—which exits to the launcher—and suppress simultaneous independent inputs, causing unintended hard drops and lost rotations.

3 open issues
What changed in this PR

Adds Block Stack, a falling-block puzzle app for the Universe 2026 badge.

Changes:

  • Implements a 10×20 board with rotation, wall kicks, line clearing, scoring, and increasing speed.
  • Adds ghost and NEXT previews, saved best scores, and title, pause, and game-over screens.
  • Documents gameplay controls.
File Description
badge/​apps/​block_stack/​README.md Describes the app and its controls.
badge/​apps/​block_stack/​__init__.py Implements gameplay, input handling, rendering, and score persistence.

Review effort: Balanced

Comment thread badge/apps/block_stack/__init__.py Resolved
Comment thread badge/apps/block_stack/__init__.py Resolved
Comment thread badge/apps/block_stack/__init__.py Resolved
jondkinney and others added 16 commits December 2, 2026 15:36
…lignment

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…er screenshot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

2 participants