Prompt library

A short canvas game

BeginnerGame

A one-screen game, playable on a keyboard, with no engine. For a real platformer, use the Phaser prompt.

When to use it

Use it for an afternoon game prototype: dodge, collect, or hit a time limit. Do not use it for a long level, a sprite sheet, or platform physics.

Variables

[GAME_NAME][FANTASY][WIN_CONDITION][CONTROLS][STACK]

Copy prompt

Make a one-screen game called [GAME_NAME], in [STACK], on canvas (or the equivalent the project already uses). No Phaser, no Unity, no paid asset.

Fantasy, in one sentence: [FANTASY]
Win condition: [WIN_CONDITION]
Controls: [CONTROLS]

Game rules
- Start with a "Play" button that also explains [CONTROLS].
- A loop with requestAnimationFrame. Delta time so movement does not depend on FPS.
- One player, simple obstacles or targets drawn with shapes (rectangle, circle). No external sprite.
- Win and lose each have their own screen and a restart button. Winning happens only when [WIN_CONDITION] is true.
- Pause on Esc. Do not use mouse-only if [CONTROLS] says keyboard.
- Audio is optional and starts muted. If it is not easy, leave it out.

Code
- One game file, or the smallest folder [STACK] needs. No new engine in package.json.
- Simple collision (AABB or distance). No platform physics, no gravity, no follow camera.
- 60fps is not a promise. The game must stay playable if a frame is late.

Deliver: how to open it, the controls, and three manual tests (play until you win, lose, pause). If [WIN_CONDITION] is vague, stop and ask for a numeric criterion.

How to run this prompt

  1. Write the fantasy in one sentence. Who the player is and what is on screen.
  2. Define the end. Points, a timer, or one collected object. Only one.
  3. Play it with the keyboard. Arrows or WASD must work, and the screen says so.

Where this breaks

Without a win state, the model makes a canvas that moves and never ends. WIN_CONDITION has to be checkable.

Result

Slot for a screenshot or demo. No result is published yet.