Skip to content

Add Pig vs Goose badge game - #164

Open
mor10 wants to merge 1 commit into
badger:mainfrom
mor10:mor10-add-game-pig-and-goose
Open

mor10 wants to merge 1 commit into
badger:mainfrom
mor10:mor10-add-game-pig-and-goose

Conversation

@mor10

@mor10 mor10 commented Oct 30, 2026 •

Copy link
Copy Markdown

What does this PR do?

Adds Pig vs Goose, a turn-based water-balloon duel for the Universe 2026 badge.

  • Includes computer, pass-and-play, and badge-to-badge modes.
  • Adds destructible terrain, rolling carts, wind, splash/fall damage, soak-based results, and a butterfly-triggered hairdryer bonus.
  • Uses host-authoritative snapshots and acknowledged controls over badgeware.link for two-badge play.
  • Includes a 24x24 menu icon and usage documentation crediting Morten Rand-Hendriksen (@mor10).
  • Corrects README development instructions that referenced tests and an icon-generation script not present in this checkout.

This is the complete new app, not an attribution-only change. The contribution is limited to five files under badge/apps/pig_vs_goose/.

Type of change

  • New badge app
  • Improvement or bug fix to an existing app
  • Firmware, menu, or system change
  • Documentation
  • Infrastructure (workflows, scripts, tooling)
  • Universe 2025 (badge25/) maintenance

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)

The only shipped image is the launcher-required icon.png at the app root; there are no additional artwork assets. No credentials or state files are included, and badge/secrets.py is unchanged. The README intentionally includes the author's requested public name and GitHub profile.

Screenshots

Simulator capture at the app's native 320x240 display resolution:

Pig vs Goose title screen with Pig, Goose, and the computer-mode selector

How to use it

Choose a mode with Left/Right and press Select. Drive with Left/Right, then Select to aim. Left/Right changes angle, Up/Down changes power, and Select throws. Back returns from aiming to driving; Menu pauses. The first player to reach 100% soak loses. Hitting a butterfly directly activates a hairdryer that removes 25 soak points.

Badge vs Badge requires two badges with badgeware.link firmware. Both players choose that mode, bring the badges close, and confirm with Select. The simulator cannot verify the radio.

Licensing and intellectual property

This is an open source repository released under the MIT License. Everything merged here is distributed under the terms of that license.

We can't accept contributions that use someone else's intellectual property (for example, characters, artwork, logos, trademarks, game names, music, fonts, or code) unless that person or company has agreed to its release under the project license. This includes recognizable likenesses of existing games or brands that could be confusing.

  • 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

Validation performed:

  • python3 .github/skills/hyb26-skill/scripts/validate_app.py badge/apps/pig_vs_goose — passed, zero warnings.
  • python3 .github/scripts/validate_app_readmes.py badge/apps — passed.
  • python3 -m unittest discover -s tests -p 'test_pig_vs_goose*.py' — exited with status 5 because no matching tests exist; this is not a test pass. The README no longer advertises these absent tests.
  • Badge Simulator check_app — passed, no errors or warnings.
  • Badge Simulator run_script — exercised computer mode, aiming/throwing, the computer's following turn, pause/title navigation, pass-and-play, simulated rotation, and the link-search lobby without a traceback.
  • Badge Simulator record — captured the hairdryer animation and asserted that it reduced soak from 70% to 45%.

No physical badge deployment or on-hardware checks were performed. Two-badge pairing, radio delivery/retries, disconnects, shared pause, rematches, and the menu icon still require real hardware verification. Licensing checkboxes are left for the contributor's explicit attestation.

Include solo, pass-and-play, and badge-link modes, the menu icon, and usage documentation. Correct development instructions to match the available validation tools.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 00:28

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

Landing-state handling can bypass fall damage, while multiplayer turn/phase gates can discard pause requests without allowing retries to recover them.

3 open issues
What changed in this PR

Adds Pig vs Goose, a turn-based water-balloon game for the Universe 2026 badge, with computer, pass-and-play, and two-badge modes.

Changes:

  • Implements destructible terrain, rolling carts, wind, soak damage, and a butterfly-triggered hairdryer bonus.
  • Adds host-authoritative multiplayer with fragmented snapshots, acknowledgments, and retries.
  • Documents controls, development checks, and outstanding physical-badge verification.
File Description
badge/​apps/​pig_vs_goose/​README.md Explains gameplay, multiplayer setup, requirements, and validation.
badge/​apps/​pig_vs_goose/​multiplayer.py Handles pairing, state synchronization, remote controls, and shared match actions.
badge/​apps/​pig_vs_goose/​game.py Implements physics, terrain, damage, turn rules, and computer aiming.
badge/​apps/​pig_vs_goose/​__init__.py Provides rendering, input handling, menus, and runtime integration.

Review effort: Balanced

if self.phase != "move" or self.walk <= 0:
return
player = self.players[self.active]
if not self.supported(player):
Comment on lines +239 to +243
if grounded:
player["y"] = ground
player["tilt"] = tilt
player["vy"] = 0
player["fall"] = ground
Comment on lines +271 to +274
if round_id != self.round or turn != self.game.turn:
return
if phase != PHASES.index(self.game.phase):
return

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