Closed izkluxcvy closed 1 year ago
--html
is for pygame-script - not well tested - and does not support packing a game that is not 100% web certified it:
if you could zip and upload the whole folder somewhere ( eg https://drop.infini.fr/ ), it could help to debug and add usefull error messages, thank you in advance.
if you want to publish a complex game, use --archive
instead you will get a web.zip suitable for itch.io or to unpack in your webserver (prefer using an iframe).
Thank you! I'll try archive.
--html
is for pygame-script - not well tested - and does not support packing a game that is not 100% web certified it:
- need posix filepath
- need no MP3/WAV ( and no presence of them) only ogg (use audacity to convert)
- need no BMP ( and no presence of them)
- no non utf-8 encoding on source filesystem ( may be a problem on non posix system )
if you could zip and upload the whole folder somewhere ( eg https://drop.infini.fr/ ), it could help to debug and add usefull error messages, thank you in advance.
if you want to publish a complex game, use
--archive
instead you will get a web.zip suitable for itch.io or to unpack in your webserver (prefer using an iframe).
I have the same issue when using <Python -m pygbag --html main.py>. I have upload all files to https://drop.infini.fr/ . here is the link : https://drop.infini.fr/r/sWv5jqntaf#VrNNs5NUnlwC//IIbdneMgChT24ElK1H1hCZDKmV6BQ=
It is worth mentioning that: <Python -m pygbag main.py> can run perfectly
@songyuyx thanks but i had no problem packing your game to .html note that "100% web certified" means no venv and no extra files lying around : ie a folder with only :
.
├── background_music.ogg
├── background.png
├── bullet.png
├── enemy_hit_sound.ogg
├── enemy_ship.png
├── explosion.png
├── gameover.jpg
├── main.py
└── player_ship.png
du -hs build/web/songyuyx.html 2.6M build/web/songyuyx.html
NB: the python runtime IS NOT encoded into the html file, so you may have trouble when behind a firewall/proxy. see https://github.com/pygame-web/pygbag/issues/77
I tried to build project as html.
but it didn't work with this error:
My Env: