Template prompt: PS1 Horror Game
Paste everything below into a new Bash.tv space.
Make a starter template: PS1 Horror Game.
- Technology: Three.js with a low-resolution retro look
- Sample gameplay: A short dark corridor walk with a flashlight; find a key and reach the door. Rooms built from boxes and planes in code.
- Project docs: full
Must haves
- Render to a 320 x 240 target and scale it up with nearest-neighbour filtering; wobbly vertices (snap positions in the vertex shader); thick fog; low-resolution textures made from code patterns only.
- Settings for brightness, a “no jump scares” option, no flashing, and reduced motion, all on by default where the device asks for them.
- Touch: stick to move, drag to look, a flashlight button.
- Register
window.bash.preview.onCapture. Check it in the viewer’s preview or withcheck_gpu_render.
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,audio-manager,settings-manager,accessibility-manager,timer-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 "PS1 Horror Game 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.
- This template uses the GPU. Never load it in the sandbox browser. Check it in the viewer’s preview (
look_at_preview) or withcheck_gpu_render, and record what you checked by hand in the evidence file (.project/evidence.json). - 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.