pygame-patterns

Installation
SKILL.md

Pygame Patterns

Purpose

Build, refactor, debug, and review pygame projects using idiomatic Python and pygame-specific practices. Use this skill with refactor-python when cleaning up pygame code.

Optimize for a stable main loop, explicit input/update/draw boundaries, predictable timing, cached assets, testable core logic, and architecture that fits the game's actual size.

First Inspection Checklist

Before editing, inspect:

  • Python tooling: pyproject.toml, uv.lock, .python-version, test config, run scripts, package layout, and supported Python versions.
  • Which package is installed: pygame or pygame-ce. They both import as pygame; choose one and do not mix them.
  • Entry point and initialization: where pygame.init(), mixer/display setup, display.set_mode(), and the main loop happen.
  • Main loop order: event pumping, input handling, update timing, drawing, display.flip()/update(), and Clock.tick().
  • Asset paths/loading for images, sounds, fonts, maps, and data.
  • Scene/state model for menus, gameplay, pause, settings, and game-over flows.
  • Sprite/entity organization, collision code, coordinate system, and camera/viewport logic.
Related skills

More from jwd83/skills

Installs
5
Repository
jwd83/skills
GitHub Stars
1
First Seen
13 days ago