Running PyGame in the web browser with Pygbag! mini Python tutorial Wasm WebAssembly

preview_player
Показать описание
Pygbag is a library that packages PyGame games made in Python to run in the browser using CPython wasm webassembly. It is really easy to use and deploy your games on the web, for example, on itch!

"It uses a CPython interpreter built on webassembly, and a static build of pygame on webassembly, using SDL and SDL_image and things on webassembly
Pygame’s dependencies already supported emscripten/webassembly
CPython 3.11 (upcoming) can be built for the web without needing patches, thanks to some core developer work"

Relevant links:
Рекомендации по теме
Комментарии
Автор

Short and precise. Thank you. If you have pygame/pygbag game, go ahead and use this video.

AltunKARIMLI
Автор

This is great stuff!!! I discovered this today and am really excited. I can't upload my web game yet, because judging is still going on for the game jam I entered in, and, putting a web version of the game up would potentially be like updating it beyond the deadline. So it will have to wait until next week but man, it's so cool that pygbag exists.

Oxxyjoe
Автор

Thank you, straight to the point and easy to follow. Worked for my project straight away

psxalx
Автор

Great tutorial. Simple and straight to the point;

zakichan_draws
Автор

This Specific Video helps me a million...

KaaR
Автор

This is so cool thanks :)
Bot for some reason it made it so that all my random values turned into set values

npr
Автор

This is super cool and easy to use so ty for making this vid.
Saw some webassembly for c++, but python is like 10x easier in pretty much every aspect so this is really helpful
all in all tytytytytytytytytytytyty
tytytytytyt
tytytytyty
tytytyty
tyty
tyt
ytyt
ytyty
tyt
ytyt
y

awesomefacts
Автор

Dosen't work for me, when I run the pygbag command it says: WARNING: wasm mimetype unsupported on that system, trying to correct

audevstin
Автор

my screen is just black, no audio and what do i do

kunugame
Автор

It doesn't work and I can't import pygame and I can't get anything to work

SalGtagVR
Автор

I am stuck on a black screen maybe because my game has multiple functions for screens like, home_screen, welcome_screen, game_screen. Can you help me?

NightSquadShorts
Автор

can i use pygbag to import the package "pygame widgets" ?

exe
Автор

for some reason my always says last argument must be app level directory. I have followed your example but isnt working sadly

apex-hybrid
Автор

Can I send a pygame to an API in real-time?

baharkarimi
Автор

I got mines to run but it only plays the music and doesn't show any of my graphics. I have to figure it out.

shantelwilliams
Автор

I am getting a grey screen and the following message: WARNING: wasm mimetype unsupported on that system, trying to correct
Not using SSL can anyone fix this?

KyleHiers-pp
Автор

hello! im using a state changer with multiple functions, not a class, just multiple functions, and the functions dont seem to be getting called for some reason, it just stays on the menu

miguelxd
Автор

Error occurred: Cannot read properties of undefined (reading 'statSync')

Bobbyonhat
Автор

I think the difference between your local FPS and the one in WASM is the browser. Browser limits everything to 60 FPS.

cyclne
Автор

i get this error message when running on the browser: Error occurred: Unexpected reserved word. Can someone help me pls?

usuariodefectuoso