The product โ 1 include
A page is just <script src="wasthon-pygame.js"> + 100%
standard pygame code. Bricks, sprites, text. Zero plumbing.
Desktop pygame VERBATIM
The exact desktop tutorial code โ while True,
clock.tick(60), sys.exit(). The loader lifts the
loop onto the browser frame clock at load time. No adaptation at all.
Animated breakout โ 1 include
A real 60 fps game via wasthon-pygame.js: bricks, score, lives,
pygame.run(frame) for the loop. Arrows / A-D, space.
Breakout (explicit bootstrap)
The same idea but with the bootstrap spelled out โ handy to understand the rAF loop under the hood.
educationalFeature suite
~40 tests: Surface/blit, PNG images, Color, Vector2, Rect, time, key, font, mixer, transform + a mini perf bench. Click the canvas = ๐ beep.
40 OK / 1 (upstream)Perf bench โ sprites
How many sprites at 60 fps? A widget to set the count by hand,
batched draw via Surface.blits(), live measured fps.
standard import pygame
import pygame, from pygame.locals import *,
pygame.sprite.Sprite โ via the real package __init__.py.
Runtime probe
The diagnostic bench that unblocked everything: Rect, set_mode, fill/draw, canvas memory forensics.
debug / forensicDear ImGui (bonus)
The binding that proved the infra (SDL2 + WASM + bridge) reused by pygame: a widget GUI driven from Python.
gui-poc