New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PKG Add pygame-ce #4602
PKG Add pygame-ce #4602
Conversation
-// SDL_Init + TTF_Init() are made in main before CPython process the module | ||
-// inittab so the emscripten handler knows it will use SDL2 next cycle. | ||
-static int font_initialized = 1; | ||
+static int font_initialized = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is true for pygame-web but not true for Pyodide.
cc: @pmp-p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm making pygame-community/pygame-ce#2748 so both pygame-web and pyodide do not require patching
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much! I don't know anything about pygame internals, so I really appreciate the various things you do for WASM support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we appreciate all the work you've done on this @pmp-p -- it seems like quite a lot of effort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ryanking13 and @pmp-p! Looks good to me.
Description
Resolve: #289
Adds
pygame-ce
2.4.1.Demo: https://ryanking13.github.io/pyodide-pygame-demo/
Known Issues
Porting existing pygame-based codes
Following changes are required to run the existing pygame code in the Pyodide.
This is already described in the docs.
Usually, pygame codes looks like this:
In Pyodide, this needs to be changed to the following:
so that the browser can take control and draw animations on the canvas.
Checklists