Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Feb 11, 2024
1 parent a185088 commit 268bd7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Read Pygbag's [project description](https://pypi.org/project/pygbag/) for a more
- Put the import statements of complex packages in order (but numpy first) at the top of `main.py`.
- Avoid using CPython's standard library for web operations, GUI (like tkinter), or I/O as it is very synchronous/platform-specific and will probably stay that way. In terms of GUI alternatives, [pygame_gui](https://pypi.org/project/pygame_gui) works on top of [pygame-ce](https://pyga.me), [Panda3D](https://www.panda3d.org/) provides [directgui](https://docs.panda3d.org/1.10/python/programming/gui/directgui/index) and Harfang3D provides imgui. They are all cross-platform.
- You can add a square image file named `favicon.png` in your game's root folder to make Pygbag use it as the web package's favicon.
- Make sure all audio files are in OGG format, and all image files are compressed. (that is, not in BMP)
- Make sure all audio files are in OGG format, and all files are compressed. (that is, not in WAV/AIFF)
- Avoid raw formats like BMP for your image assets, they are too big for web use; use PNG/WEBP or JPG instead.

- Do not use filenames like `*-pygbag.*` that pattern is reserved for pygbag internal use (optimizing pass).

Before packaging, adapt your code this way if you still want WAV/MP3 format on desktop:
Expand Down Expand Up @@ -53,8 +55,6 @@ if sys.platform == "emscripten":

- When using webusb ftdi serial emulation, use `sudo rmmod ftdi_sio` after plugging devices.

Avoid raw formats like BMP for your image assets, they are too big for web use; use PNG or JPG instead.

## Template

There is actually none, because Python-WASM is just a web-friendly version of CPython REPL with [some added facilities](https://discuss.python.org/t/status-of-wasm-in-cpythons-main-branch/15542/12?u=pmp-p). Most desktop code will run (and continue to run) with only a few changes.
Expand Down

0 comments on commit 268bd7b

Please sign in to comment.