Agent skill

pygame-core

Structure a pygame (pygame-ce) game in Python: the init/event/update/draw loop, delta-time movement, Surface/Rect blitting, keyboard/mouse input, and Sprite/Group management with collision. Use when building or debugging a pygame game — when the user mentions pygame, pygame-ce, the game loop, blit, Surface, Rect, sprite groups, or clock.tick. Targets pygame-ce.

gamedev-skillsgithub.com/gamedev-skillsGitHub ↗
claude-codeclinecodexcursorcopilotwindsurfApache-2.0
Install
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill pygame-core --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 7 KB
Bundled scripts: none
Requires: pygame-ce 2.5+ (verified 2.5.7) / pygame 2.6; Python 3.10+
Path: skills/other-engines/pygame-core/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 406
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# pygame Core Build the foundation of a pygame game in Python: the main loop, delta-time movement, drawing with `Surface`/`Rect`, input, and `Sprite`/`Group` management. Targets **pygame-ce 2.5+** (the actively maintained community fork; same `import pygame`). ## When to use - Use when starting a pygame game, fixing the loop, frame-rate-dependent speed, input handling, blitting, or sprite/group collision. - Use when code does `import pygame` and the project depends on `pygame-ce` (or `pygame`). **When *not* to use:** Python language questions unrelated to pygame. 3D rendering (pygame is 2D). For cross-engine save/load use `save-systems`; for rebindable input architecture see `input-systems`. ## Core workflow 1. **Install pygame-ce, not legacy pygame.** `pip install pygame-ce` — it's the maintained fork and imports as `pygame`. Don't install both in one environment. 2. **Init and open a window.** `pygame.init()`, `screen = pygame.display.set_mode((w, h))`, `clock = pygame.time.Clock()`. 3. **Run one loop: events → update → draw → flip.** Pump the event queue every frame (`for event in pygame.event.get()`), update state, redraw, then `pygame.display.flip()`. 4. **Make it frame-rate i

What's inside
Steps it walks through
  1. When to use
  2. Core workflow
  3. Patterns
  4. 1. Minimal game loop (the skeleton)
  5. 2. Delta-time movement (frame-rate independent)
  6. 3. Input: events vs polling
  7. 4. A Sprite subclass + a Group
  8. 5. Collision detection
  9. Pitfalls
  10. References
  11. Related skills
Ships with 1 file
  • references/sprites-and-collision.md
More from awesome-gamedev-agent-skills
All skills →
About this skill
What does the pygame-core skill do?

Structure a pygame (pygame-ce) game in Python: the init/event/update/draw loop, delta-time movement, Surface/Rect blitting, keyboard/mouse input, and Sprite/Group management with collision. Use when building or debugging a pygame game — when the user mentions pygame, pygame-ce, the game loop, blit, Surface, Rect, sprite groups, or clock.tick. Targets pygame-ce.

How do I install it?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill pygame-core --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From gamedev-skills/awesome-gamedev-agent-skills, a repository with 406 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going