Template prompt: Pixel Art RPG
Paste everything below into a new Bash.tv space.
Make a starter template: Pixel Art RPG.
- Technology: Canvas 2D, tile-based, pixel-perfect scaling
- Sample gameplay: A small village map: walk on a tile grid, talk to 2 characters, pick up an item, open a chest that needs it. Save and load from the pause menu.
- Project docs: full
Must haves
- Design size 320 x 180, Responsive Layout Manager with
pixelArt: true(whole-number scaling, no smoothing). - Tiles and characters drawn as simple coloured pixel shapes in code, from a small palette, so a real tileset drops in later. Map data in
src/data/map.json. - Dialogue boxes with text in
src/data/dialogue.jsonthrough the Localization Manager. - Grid movement with the Collision Engine’s tile collision; touch stick snaps to 4 directions.
Rules for every template
- Read the
apps-and-gamesandbash-js-sdkskills first. Load Bash.js inindex.html. Don’t use alert, confirm or prompt. - This is a template: a small, clean, working starting point for new games, not a finished game. Build only what this prompt asks for. No extra modes, levels, pages or demos.
- The sample gameplay is short and clearly marked as the part to replace. Keep tunable numbers in
src/config.js. - No generated art or music. Draw shapes in code. Leave sound wired up through the Audio Manager with no sound files, and say in the README where to add them.
- Keyboard, mouse and touch all work (and gamepad where the Input Manager is used). The game pauses when the tab is hidden.
- Title, play, pause and game over screens, and restarting without reloading the page.
- Set the test hook:
window.__game = { state, pause, resume, restart, gameOver }(details in the quality gates guide). - Wrap the game loop with the Error Handler’s
guard()so one error doesn’t freeze the game.
The toolkit
Download the toolkit once and use its parts instead of writing them again:
curl -fsSL https://bash.l00.pw/toolkit/toolkit.zip -o /tmp/toolkit.zip
python3 -c "import zipfile; zipfile.ZipFile('/tmp/toolkit.zip').extractall('/tmp')"
- Components: copy these from
/tmp/toolkit/components/<name>/<name>.jsintosrc/components/unchanged:input-manager,touch-controller,scene-manager,save-manager,camera-controller,collision-engine,animation-manager,state-machine,notification-manager,localization-manager,audio-manager,error-handler. Each one’s README (/tmp/toolkit/components/<name>/README.md, or https://bash.l00.pw/toolkit/components/) shows how to use it. If a component needs a change, don’t edit it in place; note it in the template’sdocs/TECHNICAL_DEBT.md. - Project docs:
python3 /tmp/toolkit/project-docs/new-project.py . --name "Pixel Art RPG template", then fill every file in for this template. No template text may be left. - Quality gates:
python3 scripts/run-gates.py .(guide: https://bash.l00.pw/toolkit/quality-gates/).
Proving it works
- Run the quality gates and keep the report (
.project/VALIDATION_REPORT.md). Each gate must be PASS, FAIL, NOT TESTED or NOT APPLICABLE, with evidence. Never mark something PASS because the code looks right. - Fix every FAIL. Anything still NOT TESTED needs a reason in the report.
- Test in the sandbox browser with Playwright at phone and desktop sizes; the gates already do most of this.
- Check the phone layout with the viewer’s preview at phone size, and restore their setting afterwards.
README for people using the template
The template’s README.md must say: what’s included, how to run it, the controls, which files to change first to make a new game from it, which toolkit components it uses, and the latest quality gates summary.
Done when
- The sample plays from title to game over and back, on desktop and on a phone.
- All the must-haves above are in.
- Project docs filled in, with no template text left.
- Quality gates: no FAIL, and every NOT TESTED explained.
- Committed with a clear message.
When it’s done, tell me in plain words what the template includes, what to change first to start a new game, and anything that is still NOT TESTED.