Skip to content

elgopher/piweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

piweb

Experimental Pi backend for web browsers.

A replacement for piebiten and Ebitengine.

Play the Snake game in the browser


🎯 Project Goals

The aim of this project is to create a new backend for Pi games that runs efficiently in modern web browsers and offers significant improvements over the standard piebiten backend:

📦 Smaller Binary Size

  • At least 2× smaller .wasm output

🔊 Better Audio

  • Minimal latency — as low as 20 ms (compared to 60 ms in piebiten)
  • Glitch-free playback — thanks to audio processing in a high-priority, separate audio thread

🧪 How It Works

These improvements are possible thanks to:

  • Audio Worklet API – the browser-native API for real-time, low-latency audio processing
  • Writing the code directly in JavaScript
  • Reducing the number of dependencies

🚧 Status

This is an experimental project. Some features are ready, some are not. Some features are buggy and generally not all possible platforms are supported:

  • graphics rendering using Canvas2D
  • keyboard support
  • gamepad support
  • mouse support
  • debug mode support
  • desktop web browsers - Chrome, Firefox, Edge, Safari etc.
  • mobile web browsers - virtual keyboard and gamepad support
  • audio support
  • 3x smaller WASM binary - Snake game is 3 MB (0.9 MB after gzip) instead of 10 MB

About

Pi experimental backend for the web

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published