I need to add visuals!
A happy squirrel jumping around alone on a lonely island! This is a simulation of a random walk in 1D. Originally designed to be employed as a learning aid (interactive tool), for students of basic university statistics.
Contributions and any feedback are welcome, although the work on this is finished.
pip install -r requirements.txt
python main.pyThe game is deployed to GitHub Pages from the web/ folder. Rebuild the
pygbag bundle with:
pygbag --build --ume_block 1 .then copy build/web/assets.apk and build/web/assets.tar.gz into web/
(keep the existing web/index.html). Push to deploy.
Notes for the pygbag 0.9.x build:
- The
pygame_gui/andi18n/packages are vendored inside the game folder so nothing is pip-installed at runtime (pygbag 0.9.3 does not bundle third-party packages, and PyPI has noi18nproject). - The PEP 723 block must not pin versions (pins crash the runtime's
find_spec), andimport pygamemust appear inmain.pyso the runtime preloads the pygame submodules. - pygame_gui is patched for wasm: no loading threads (Emscripten cannot start
threads) and fonts are loaded from a filesystem path instead of a BytesIO
(pygame-ce wasm
pgRWops_FromObjectonly accepts paths).