Pyodide with SDL2 support. #2986
km19809
started this conversation in
Show and tell
Replies: 1 comment 6 replies
-
Thanks for sharing your work @km19809. Are you using SDL2 port that emscripten provides or did you build SDL2 by userself? I think the emscripten version of SDL2 was a bit old.
Should SDL2 need to be linked to the Pyodide main module? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I want to show a (WIP) work that uses pyodide and SDL2.
Here is one of the demo
It runs pyxel, which is one of the greatest python 2D game engines.
Although the porting was not finished yet, I want to share the result here.
Without the support from the contributors of pyodide, I was not able to port them. (Of course, thanks to participants of kitao/pyxel#354 !)
Its main differences from the original are:
canvas
automatically, by modifyingpre.js
Of course, there are some weird behaviors (especially related to the mouse).
Also, other SDL2 packages are not tested (ex: Pygame, PySDL2; They need additional libs such as SDL2_TTF).
But I'm glad that I can share my experience.
It will be great if pyodide support SDL2 officially.
(At least, provide a version with SDL2 support. It makes compiled binary larger, so it loads slow.)
Here's my fork:
github
Beta Was this translation helpful? Give feedback.
All reactions