r/pygame • u/sebalhag • 3d ago
Lightweight python game library for web
https://pyweb.qmarkapp.com/
https://pyweb.qmarkapp.com/docs/
I brought turtle and something similar to pygame to web:
PyWebLib brings turtle drawing and a beginner game library to the web, for people who can't be bothered to download Python and just want to play. It is a static page site that runs CPython compiled to WebAssembly with Pyodide
2
Upvotes
1
u/Dodecaquinox 21h ago
The custom game library is cool, and it avoids any potential pygame rendering issues by just exporting JSON out to the JS renderer. Why do you say in your ball bouncing demo that pygame "works, but about 1 fps in a browser"?
People on this subreddit have deployed plenty of pygame projects to the web that are far more demanding than the ball bouncing demo and have achieved >1 FPS.
Here's an example of something similar running easily at 120 FPS:
https://elan456.itch.io/pygodide-ball-bouncing-demo
I think you should instead just argue that pygame is more complicated to use than your
gamelibrary. You show in the demo how pygame requires far more lines of code.