HomeUse cases › Pygame sprites · Updated Jul 23, 2026
Pygame · load, blit, walk

Pygame character sprites, code included.

The frames come pre-cut, the folders are named by direction, and the ten lines of Python that animate them are printed on this page. One photo of a real person in, a walking Pygame character out. One-time $5.

Make a sprite — $5
No account · ZIP in minutes · money-back if it fails QA (handled manually during beta)

Pygame's eternal problem: the hero is a rectangle

Pygame is where first games get built — and lately where an enormous number of vibe-coded games get built, because an AI assistant can write a complete Pygame loop in one response. What no assistant can do is draw a character worth looking at, let alone one that looks like you. So the project ships with pygame.draw.rect where the hero should be.

This pack replaces the rectangle with a real character forged from a photo — 16 pre-cut transparent PNGs in direction-named folders, no spritesheet math, no slicing code. The naming is literal: frames96/down/down_01.png through down_04.png, then left/, right/, up/.

The whole loader and animator, for real

Pages that say "just a few lines!" and never show them are a genre. Here are the actual lines:

DIRS = ("down", "left", "right", "up")
walk = {d: [pygame.image.load(f"frames96/{d}/{d}_{i:02d}.png").convert_alpha()
            for i in (1, 2, 3, 4)] for d in DIRS}
facing, walk_ms = "down", 0

# inside your game loop, after handling input:
dt = clock.tick(60)                       # ms since last frame
moving = dx != 0 or dy != 0
walk_ms = walk_ms + dt if moving else 0
frame_i = (walk_ms // 135) % 4 if moving else 0   # frame 0 = neutral pose
screen.blit(walk[facing][frame_i], player_rect)

Set facing from your input handling ("left" when dx < 0, and so on) and that's the entire animation system: a dict, a timer, one blit. The 135ms cadence matches the pack's own walk GIFs, and frame 0 of every direction is the neutral standing stance — the pack's columns run neutral / left-step / neutral / right-step — so idling is free.

Why the frames behave

Frames16 loose PNGs per size — no slicing code needed
Sizes96×96 and 48×48 per frame
Foldersframes96/<direction>/<direction>_01..04.png
Load withpygame.image.load(path).convert_alpha()
Baselinefeet aligned across all frames — Rect collision never drifts

Because every frame sits centered with feet on a shared baseline, your Rect-based collision keeps working whichever way the character faces — no per-frame offsets, no hitbox drift. Prefer one image? The 4×4 sheets (sprite-sheet-96-transparent.png, rows down/left/right/up) are in the ZIP too, and Surface.subsurface cuts them at exact 96 or 48px cells.

From a photo, not a prompt

A real portrait photo→ your spriteThe same person as a walking Pygame-ready game sprite

The character is a specific real person — you, a friend, whoever's photo you upload — kept recognizable at sprite size. For a learning project or a gift game, that's the difference between "a character walks" and "I walk."

What's in the $5 pack

frames96/ + frames48/16 transparent PNGs each, foldered by direction
sprite-sheet-96/48-transparent.png4×4 sheets if you'd rather subsurface
strips/ ×8per-direction horizontal strips
walk/ ×4transparent looping GIFs for READMEs + itch pages
manifest.jsonlayout + QA notes — paste it to your AI assistant

One-time $5, no account, 3 free retries, money-back if a pack fails QA (handled manually during beta).

Frequently asked questions

Do PixelForge sprites work with Pygame?

Yes — the pack is plain transparent PNGs, pre-cut into 16 frames per size and foldered by direction. Load them with pygame.image.load(path).convert_alpha() and blit; there's no engine-specific format involved.

Do I need to slice a sprite sheet in code?

No — the 16 frames ship as individual files, so most Pygame projects never touch the sheet. If you prefer one image, the 4×4 sheets are included and Surface.subsurface cuts them at exact 96px or 48px cells.

My sprite has a white box around it — what's wrong?

Use convert_alpha() instead of convert() when loading. The frames have a real alpha channel; convert() throws it away, which is where the box comes from.

I'm vibe-coding a game with an AI assistant — will this fit?

That's the core audience. Paste the pack's manifest.json (or just this: "16 transparent PNGs at frames96/<dir>/<dir>_01..04.png, directions down/left/right/up, frame 1 is the neutral pose, ~135ms per frame") into your assistant and it will write the loader correctly on the first try.

Is there an idle, attack, or jump animation?

No — the pack is a 4-direction walk cycle only. For idle, hold frame 0 (the neutral stance); for anything beyond walking you'd pair the pack with an animation tool or an artist.

Put anyone into your game.

$5 · one photo · 4-direction walk pack · no subscription

Make a sprite — $5