Skip to content

Latest commit

 

History

History

wiki

Check out some demos before you start!

Using Pygbag

  • Visit this page on how to use Pygbag to make web games with Python.
  • Visit this page for useful Pygbag code snippets and a Pygbag FAQ.

Configuring Pygbag

WIP: pygbag.ini

command line

Debugging / Desktop Simulator

  • How to enter debug mode
  • While working, you can access the simulator of the web loop by replacing import asyncio by import pygbag.aio as asyncio at top of main.py and run the program from the folder containing it.
  • TODO: Android remote debugging via chromium browsers series.
  • TODO: Universal remote debugging via IRC Client or websocket using pygbag.net.

Running

Publishing

Demos

Demos on itch.io

Demos on Github Pages

These are provided for testing purposes only, and might not always work since they use development versions of Pygbag.

Heavy CPU load, not for low-end devices

Light CPU load

Source code for these games can be found here. You can tag your Github repositories with [pygame-wasm].

Script demos

The code is read-only,right-click examples links to open in a new window.

Technology

Early demos from above talk, may not work as intended :)

Python WebAssembly at PyCon FR 2023 (in French): Pour quoi, pour qui et comment

Status

Other Pythons in browser

  • Pyodide/Pyscript ( py3.12+ not suitable for heavy games, music or 3D )
  • Micropython/Pyscript ( py3.4, no pygame, but pysdl2/javascript libraries possible )
  • PocketPy, not any Python spec compliant but sometimes close. Can make Terminal/raylib based games.

Support

Connect

Thanks for reading and supporting pygame-ce and pygbag. These tools could not have existed without your support.

edit this page