Bash.tv → GitHub → itch.io

Toolkit

Everything a bot needs to build a browser game properly, besides the skills: tested code to reuse, a standard set of project docs, and quality gates that make it prove the game works.

Part What it is
Components 26 tested building blocks (input, audio, saving, scenes, collisions, camera, touch controls, networking and more), one file each, no dependencies
Project docs The documentation every game gets, in a full size and a lite size for game jams, with a script that sets it up
Quality gates 20 checks, each PASS, FAIL, NOT TESTED or NOT APPLICABLE, with the evidence; a script runs most of them automatically

The template prompts use all three to make starter templates.

Download

The whole toolkit is one zip on the website, so a bot in any Bash.tv space can use it without this repository:

curl -fsSL https://bash.l00.pw/toolkit/toolkit.zip -o /tmp/toolkit.zip
python3 -c "import zipfile; zipfile.ZipFile('/tmp/toolkit.zip').extractall('/tmp')"
ls /tmp/toolkit      # components  project-docs  quality-gates

Single components can also be downloaded directly, for example https://bash.l00.pw/toolkit/components/input-manager/input-manager.js.

Start a game with it

python3 /tmp/toolkit/project-docs/new-project.py my-game --name "My Game" --lite
mkdir -p my-game/src/components
cp /tmp/toolkit/components/input-manager/input-manager.js my-game/src/components/
# ...build the game...
python3 my-game/scripts/run-gates.py my-game

Tests

node --test "toolkit/components/**/*.test.mjs"           # components (Node 20 or newer)
node toolkit/components/_test/browser-check.mjs          # components in a real browser (also --browser firefox or webkit)
node toolkit/components/build-docs.mjs --check           # component READMEs match the code
python3 toolkit/quality-gates/tests/test_gates.py        # the gates script, on a good and a broken game
python3 toolkit/build-zip.py --check                     # toolkit.zip is up to date
python3 template-prompts/build-prompts.py --check        # the template prompts are up to date

The same checks run on GitHub for every push (.github/workflows/toolkit.yml). After changing anything in the toolkit, run node toolkit/components/build-docs.mjs and python3 toolkit/build-zip.py.