Skip to content
SkillModel-led1,995 tokens in use

pygame-core

Helps an agent build and debug 2D Python games with pygame-ce: the game loop, delta time, Rects, sprite groups and headless test runs.

9,684 stars on the repository Apache License 2.0gamedev-skills/awesome-gamedev-agent-skills · skills/other-engines/pygame-core
npx skills add gamedev-skills/awesome-gamedev-agent-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing pygame-core costs

94tokens idle
1,995tokens in use
3,161tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldetectednetworkdetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure25/25
  • Examples12/15
  • Output15/15
  • Size15/15
  • Resources15/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 101

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity92
  • Maintenance96
  • Community60
  • Maturity24
  • Momentum40

This skill helps an agent build and debug a pygame game, targeting pygame-ce 2.5.8, the maintained fork that imports as pygame. It checks which package is installed, keeps game logic testable without a window and runs one loop per frame: drain events, update with a clamped delta, draw, flip.

It includes a loop that can run headless with a frame count and a screenshot, a sprite that moves at a constant speed on diagonals, and unit-test advice using the SDL dummy drivers. A gotcha list covers frozen windows, speed that varies per machine, integer Rect truncation and pygame and pygame-ce installed together.

What You Get

  • A five-step workflow from checking the installed package to testable logic, one loop per frame, asset loading order and a headless verification
  • A runnable loop with frame count and screenshot options, and a Sprite class using float rects and a normalized move vector
  • Commands that run unit tests and a scripted game run with the SDL dummy video and audio drivers
  • A gotcha list for frozen windows, frame-rate dependent speed, Rect truncation, convert errors, missing mixer and conflicting installs

Common Use Cases

  • Starting a pygame project with a correct loop and delta time
  • Fixing a window that says not responding
  • Making game speed the same on every machine
  • Running a game check in CI without a display

What Makes It Unique

The skill treats pygame-ce as the default and explains how to tell it from legacy pygame at run time. It builds the loop so it can quit after a set number of frames and save a screenshot, which lets an agent check drawing and loading without a screen, and it states what that run cannot prove.

Under The Hood

The agent loads the SKILL.md and, when needed, a reference on sprite groups, masks and audio. It runs a short Python command to read the installed pygame version, may install pygame-ce with pip for a new project, edits Python files in your project, and runs unit tests and the game with the SDL dummy video and audio drivers. The scripted run writes a PNG screenshot into your project. It fetches no web pages and calls no APIs; feel, audio and real input need a person to play and report.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers