/space-shooter
Open Player
prompt.txt
01Long prompt. Got cut off!! 02 03I use bullet points in my prompts because too much information on one line uses up the tokens and the LLM skips a lot. Every single thing on a separate line makes a huge difference. 04 05create a complete, single-file html5 canvas game titled "space shooter" with embedded css and javascript. no external libraries except google fonts. 06 07IMPORTANT!! follow these exact specifications. Do not skip a line. Constantly read this prompt again until the code is done: 08 09architecture requirements: 10- output as one self-contained .html file with <style> and <script> tags. 11- use requestanimationframe with delta-time (dt) physics. 12- dynamically resize canvas to window.innerwidth/height on load and resize event. 13- save high scores to localstorage under key spaceshooterscores. 14- block default right-click context menu on canvas. 15- use canvas 2d api for all rendering (no dom/svg overlays for gameplay). 16 17visual style: 18- aesthetic: 1980s color vector arcade style. neon glowing lines using ctx.shadowblur and ctx.shadowcolor. 19- fonts: import oxanium (200-800) for gameplay ui and audiowide for menus/title screens via google fonts. scale all in-game text by 1.5x base size. menu text uses audiowide. 20- background: black screen. white 1-pixel parallax stars scroll opposite to camera movement. stars wrap seamlessly. 21vector rendering: all ships, asteroids, weapons, and ui elements drawn with ctx.stroke() or ctx.arc(). no sprites or images. 22 23screen flow & navigation: 24- attract screen: title "space shooter" (audiowide), subtitle "generic space shooter", blinking "press any key to play". parallax stars animate upward. 25- controls screen: lists all controls & power-up icons with vector graphics next to names. increased line spacing (40px per line). 26- high scores screen: top 10 scores from localstorage, 3-char names, score values. "press any key to play" prompt. 27- screens 1-3 auto-cycle every 10 seconds. 28- play screen: main game view. 29- name entry screen: overlay on game. blinking cursor. a-z input, max 3 chars. enter to submit, esc to return to high scores. 30 31shop screen: 32- between levels. lists purchasable power-ups with vector icons. ↑/↓ to select, enter to buy, space to continue. shows "not enough gold" or purchase confirmation. 33 34player mechanics: 35- ship shape: enterprise-style vector outline (saucer, hull, wings, bridge). 36 37controls: 38- w or up = thrust forward 39- a & d or left and right= rotate 40- s or middle mouse = activate shields 41- left click = fire bullets 42- right click = fire phaser beam 43- space = fire active special weapon 44- scroll wheel = cycle special weapons (torpedo → mine → homing) 45- pause: p key toggles pause overlay with "paused", "p: resume", "q: quit to title". 46- quit: q key instantly returns to attract screen, clears active sounds. 47 48physics: 49- frictionless newtonian drift. velocity cap: 600 px/s. acceleration: 200. max thrust: 600. 50 51shields: 52- 10 units max. each hit reduces by 1. if shields > 0, no damage taken. ship flashes red on hit. color shifts from cyan/green → red as shields deplete. 53 54lives: 55- start with 3. on 0 shields, ship explodes , loses all power-ups, respawns in 3s. 56- if killed by black hole, respawns at random safe location. game over at 0 lives. 57 58thruster audio: 59- continuous white noise 60- frequency scales with thrust level. stops smoothly when thrust ends. 61 62play area: 63- 5x screen width/height. camera smoothly follows player 64 65boundaries: 66- objects bounce off edges with velocity reversal (omega race style). 67 68black hole: 69- center of map. kill radius: 24px. 70 71gravity constant: 72- affects player, enemies, asteroids, and all projectiles. 73 74time dilation: 75- as player approaches black hole (<700px), global time scale reduces to 0.25x linearly. all game updates multiply by dt * timescale. 76- ghosting effect: within 900px of black hole, all entities render 5x trailing ghosts. trail skip distance increases closer to center. ghost opacity scales with proximity. 77 78Got cut off here