Space Shooter
Long prompt. Got cut off!! I 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. create a complete, single-file html5 canvas game titled "spac...
Long prompt. Got cut off!! I 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. create a complete, single-file html5 canvas game titled "space shooter" with embedded css and javascript. no external libraries except google fonts. IMPORTANT!! follow these exact specifications. Do not skip a line. Constantly read this prompt again until the code is done: architecture requirements: - output as one self-contained .html file with <style> and <script> tags. - use requestanimationframe with delta-time (dt) physics. - dynamically resize canvas to window.innerwidth/height on load and resize event. - save high scores to localstorage under key spaceshooterscores. - block default right-click context menu on canvas. - use canvas 2d api for all rendering (no dom/svg overlays for gameplay). visual style: - aesthetic: 1980s color vector arcade style. neon glowing lines using ctx.shadowblur and ctx.shadowcolor. - 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. - background: black screen. white 1-pixel parallax stars scroll opposite to camera movement. stars wrap seamlessly. vector rendering: all ships, asteroids, weapons, and ui elements drawn with ctx.stroke() or ctx.arc(). no sprites or images. screen flow & navigation: - attract screen: title "space shooter" (audiowide), subtitle "generic space shooter", blinking "press any key to play". parallax stars animate upward. - controls screen: lists all controls & power-up icons with vector graphics next to names. increased line spacing (40px per line). - high scores screen: top 10 scores from localstorage, 3-char names, score values. "press any key to play" prompt. - screens 1-3 auto-cycle every 10 seconds. - play screen: main game view. - name entry screen: overlay on game. blinking cursor. a-z input, max 3 chars. enter to submit, esc to return to high scores. shop screen: - between levels. lists purchasable power-ups with vector icons. โ/โ to select, enter to buy, space to continue. shows "not enough gold" or purchase confirmation. player mechanics: - ship shape: enterprise-style vector outline (saucer, hull, wings, bridge). controls: - w or up = thrust forward - a & d or left and right= rotate - s or middle mouse = activate shields - left click = fire bullets - right click = fire phaser beam - space = fire active special weapon - scroll wheel = cycle special weapons (torpedo โ mine โ homing) - pause: p key toggles pause overlay with "paused", "p: resume", "q: quit to title". - quit: q key instantly returns to attract screen, clears active sounds. physics: - frictionless newtonian drift. velocity cap: 600 px/s. acceleration: 200. max thrust: 600. shields: - 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. lives: - start with 3. on 0 shields, ship explodes , loses all power-ups, respawns in 3s. - if killed by black hole, respawns at random safe location. game over at 0 lives. thruster audio: - continuous white noise - frequency scales with thrust level. stops smoothly when thrust ends. play area: - 5x screen width/height. camera smoothly follows player boundaries: - objects bounce off edges with velocity reversal (omega race style). black hole: - center of map. kill radius: 24px. gravity constant: - affects player, enemies, asteroids, and all projectiles. time dilation: - as player approaches black hole (<700px), global time scale reduces to 0.25x linearly. all game updates multiply by dt * timescale. - 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. Got cut off here