Skip to content

Add pixel-art assets and a graphical (pygame) version of the game#3

Open
m5136771 wants to merge 1 commit into
mainfrom
claude/wonderful-ptolemy-b8byom
Open

Add pixel-art assets and a graphical (pygame) version of the game#3
m5136771 wants to merge 1 commit into
mainfrom
claude/wonderful-ptolemy-b8byom

Conversation

@m5136771

Copy link
Copy Markdown
Owner

What this adds

A cohesive set of pixel-art sprites and a new graphical, point-and-click version of Liar's Dice that actually uses them. The original terminal game (liars_dice.py) is unchanged — this is a second way to play.

New files

  • generate_assets.py — builds every sprite with Pillow. Each sprite is authored at a tiny native resolution (a grid of characters) and upscaled with nearest-neighbour for a crisp, chunky pixel look. Produces: six dice faces, a "hidden" die for the bots' secret rolls, a pirate skull, a treasure chest, a gold coin, a dice cup, and a wooden plank used to tile the table-top.
  • assets/ — the generated PNGs, committed so the game runs out-of-the-box with only pygame (no Pillow needed just to play).
  • liars_dice_gui.py — a pygame UI on a wood table: skull/cup avatars, face-up player dice, hidden bot dice, a current-bid banner, a value + quantity bid picker, RAISE / CHALLENGE buttons, a dice reveal, and win/lose screens. It reuses the same bot strategy as the terminal version.
  • requirements.txtpygame + pillow.

Changed

  • README.md — documents both versions and the artwork.
  • liars_dice.py — one comment line: marks the "Add a GUI" future-feature as done. No behaviour change.

How to play it

pip install -r requirements.txt
python liars_dice_gui.py          # artwork is already in assets/
python generate_assets.py         # only if you want to re-create the art

Testing done

  • Ran generate_assets.py and visually reviewed every sprite.
  • Headlessly rendered the human-turn, reveal, and win/lose frames to verify layout.
  • Simulated 200 full games to completion (turn order, challenges, eliminations, win/lose) with no crashes.
  • Drove real button clicks through handle_click (ROLL → bid → CHALLENGE → reveal → CONTINUE → PLAY AGAIN).
  • Byte-compiled all modules.

Preview

The graphical version on a human's turn (six-die value picker with quantity stepper and RAISE/CHALLENGE buttons):

Bots across the top hold hidden dice; your dice are face-up; the centre banner shows the standing bid and total dice in play.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JGnKkxFCmoNDqhCyiyyhj2


Generated by Claude Code

Generate a cohesive set of pixel-art sprites and wire them into a new
point-and-click version of Liar's Dice. The original terminal game is
unchanged.

- generate_assets.py: builds all sprites with Pillow (six dice faces, a
  hidden die, pirate skull, treasure chest, gold coin, dice cup, and a
  wooden plank table tile). Authored at low resolution and upscaled with
  nearest-neighbour for a crisp, chunky pixel look.
- assets/: the generated PNGs, committed so the game runs out-of-the-box
  with only pygame installed.
- liars_dice_gui.py: a pygame UI on the wood table with skull/cup avatars,
  face-up player dice, hidden bot dice, a current-bid banner, a value+
  quantity bid picker, RAISE/CHALLENGE buttons, a dice reveal, and win/lose
  screens. Reuses the same bot strategy as the terminal version.
- requirements.txt + README: document both versions and the artwork.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JGnKkxFCmoNDqhCyiyyhj2
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