pygame-web / pygbag

python and pygame wasm for everyone ( packager + test server + simulator )
https://github.com/pygame-web
MIT License
295 stars 34 forks source link

pythonrc.py missing #166

Closed Not1Sam closed 2 months ago

Not1Sam commented 2 months ago

i am trying to run my game in my website but when i try local host i only get a black-screen in the game window. i made a simple game with no images or assets and it worked but now that i am try to run my tic tac toe game that is in python btw it seems to not work. idk if there is a fix on my end if so please let me know. PS: the console gives me the following error:

ERROR 404: https://pygame-web.github.io/archives/0.9/pythonrc.py
127.0.0.1 - - [24/Apr/2024 13:49:00] code 404, message File not found
127.0.0.1 - - [24/Apr/2024 13:49:00] "GET //archives/0.9/pythonrc.py HTTP/1.1" 404 -
pmp-p commented 2 months ago

try removing the "build" folder in the game folder before retry/update pygbag

Not1Sam commented 2 months ago

i did that like 5 times and it did not work same error

pmp-p commented 2 months ago

What is your pygbag version (python -m pygbag), python version, operating system and version + lang interface ?

Also what exact command line call did you run against the game ?

from the console i'd say you are not on 0.9.1 version because the file is now called cpythonrc.py unlike earlier versions.

Not1Sam commented 2 months ago

So for the version its 0.9.1 the lates one and i ran the command that was in the doc "pygabag "the file path" but i think its pygbag running with pygame_gui because i coded a simple cube moving game and it worked. A solution would be to not use pyg_gui but i need to for the text_input.

pmp-p commented 2 months ago

pygame_gui works fine with pygbag if you include the PEP 723 header correctly to install it along with the language support eg : https://pygame-web.github.io/showroom/pypad.html#src/test_pygamegui.py

Not1Sam commented 2 months ago

by header do u mean :

# /// script
# dependencies = [
#  "pygame-ce",
#  "pygame-gui",
#  "python-i18n",
# ]
# ///

and should i import i18n as well ?

Not1Sam commented 2 months ago

Nevermind it worked mate THANK YOU VERY VERY MUCH