All projects

Flappy Bird in the Browser

Personal project

Not a JavaScript rewrite: pygbag compiles the Python source and a CPython interpreter to WebAssembly. The same file runs natively and in the browser.

Play it

Runs entirely in your browser. Nothing is sent to a server.

What I built

  • Async game loop that yields every frame so the browser tab doesn't freeze.
  • Fixed a browser-only crash caused by pygbag's entry-file-only dependency scan.
  • Cut the bundle from 12MB to 34KB by staging only runtime files.
  • Click-to-load embed and touch controls for mobile.

Stack

PythonpygamepygbagWebAssemblyasyncio