Skip to content
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

Usefull Lib to have in pygbag prebuilts ( compiled for wasm ) #2

Closed
pmp-p opened this issue Aug 11, 2022 · 10 comments
Closed

Usefull Lib to have in pygbag prebuilts ( compiled for wasm ) #2

pmp-p opened this issue Aug 11, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@pmp-p
Copy link
Member

pmp-p commented Aug 11, 2022

Current status:

done for 3.11 and pygbag 0.6+


numpy
pgzero
matplotlib (via svg not Agg)

still pending/testing


pytmx
pymunk
raypyc ( raylib via ctypes)
harfang
panda3d
opencv

@pmp-p pmp-p added the enhancement New feature or request label Aug 11, 2022
@pmp-p pmp-p pinned this issue Aug 11, 2022
@pmp-p pmp-p changed the title Usefull Lib you'd like to have in pygbag default prebuilts ( that need some wasm compilation ) Usefull Lib you'd like to have in pygbag default prebuilts ( compiled for wasm ) Aug 11, 2022
@pmp-p pmp-p changed the title Usefull Lib you'd like to have in pygbag default prebuilts ( compiled for wasm ) Usefull Lib to have in pygbag prebuilts ( compiled for wasm ) Aug 11, 2022
@FinFetChannel
Copy link

Numpy for sure, I also would love to see support for PyOpenGL or modernGL and Numba, but I think these will have to wait a bit

@pmp-p
Copy link
Member Author

pmp-p commented Sep 10, 2022

PyOpenGL has experimental support for GLES2 with : from OpenGL.GLES2 import *
so => maybe

moderngl should support gles2
so => maybe

numba/pythran
=> no, they are llvm jit so it will be very difficult or impossible ( see numba/numba#3284 (comment)), AOT is the way ( faster, smaller sizes )

i'll add wasabi2d since i was able to compile wasabi.geom to wasm today

@robclewley
Copy link

robclewley commented Dec 4, 2022

I'm very excited about this project. I haven't picked up PyGame for a few years because of the no-browser limitation. I am trying to build complex multiplayer games and have previously relied on twisted to provide client-server abstractions along with built-in threading support. Is twisted something you could support, or otherwise what do you recommend? I'm happy to help in some way, if I can. I understand that the answer might be "you should figure out how to do it with asyncio instead" :)

@pmp-p
Copy link
Member Author

pmp-p commented Dec 7, 2022

@robclewley asyncio maybe not, but async for sure. For socket handling polling non-blocking sockets is ok too : i managed to connect to irc fine via a websocket proxy that way. green threading is ok too.

One thing to keep in mind, everything read will be gathered on display sync ( usually 1/60 ). Also webrtc is not the default mode of operation and is yet untested : default is bsd socket emulation ( without peek ).

if you want to help on network you're welcome and it's best to join the pygame discord

@LiorKovalio
Copy link

@pmp-p Is SciPy in? I see it on index.json but I can't find the actual file in pkg .
On startup I get:

1204: want='scipy' found : True
pkg : http://localhost:8000/archives/repo/pkg/scipy-1.9.3-cp311-cp311-wasm32_mvp_emscripten.whl
 |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX| 100.0% 
PKG NOT FOUND : want='scipy', resume=None, ex=Non

and then:

PKG NOT FOUND : want='scipy', resume=<function <module> at 0x6789f0>, ex=ModuleNotFoundError("No module named 'scipy'")

I'm using pygbag==0.6.6 . numpy works well.

@pmp-p
Copy link
Member Author

pmp-p commented Jan 16, 2023

the SciPy wheel i made did not work well so i removed it, as soon as it is fixed i'll put it back

@Michael-Everest
Copy link

Wow, once I found pygbag I was very, very happy: I can now show off my projects to collages a lot easier. Now, would there be anyway to copy and paste text, I'm trying to make a cryptogram solver and ill need input text. I know that there are modules like pyclip and pyperclip that can access the computers clip board, and now I understand why there not working. Ill look around a bit more with numpy, pgzero, and matplotlib, and see what I can find that could help me get c/p from the user. Thank you pmp-p for making this liberry, it's amassing

@pmp-p
Copy link
Member Author

pmp-p commented Jan 22, 2023

@Michael-Everest there are multiple ways, you can get text in html elements, terminal or pygame window. up to you to experiment. you can find help on pygame discord https://discord.gg/p7RjnVNTcM (preferred, very reactive) , or https://www.reddit.com/r/pygbag and once your problem is solved you can help enhance the examples snippets with your gained experience

@Michael-Everest
Copy link

Thank you @pmp-p, I'll defiantly check this out!

@pmp-p pmp-p transferred this issue from pygame-web/pygbag Feb 3, 2023
@pmp-p
Copy link
Member Author

pmp-p commented Feb 3, 2023

closing in favour of pygame-web/pygbag#63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants