Skip to content
Game DNA Play a demo

For games you build with an AI coding agent

Drop game feel into your own game.

Game DNA is a library of 101 playable game elements: hit effects, battle systems, lights, menus, 3D scenes. Play one, copy its prompt, and your coding agent adds it to your browser game.

Modern damage numbersHits arc out, crits pop, combos roll into one total.Play

What you get with every element

See it. Copy it. Your agent builds it in.

01

A demo you can play

Every element runs on its own page. Press the buttons, change the settings, see how it feels before you take it.

prompt.md
# Add modern damage numbers to my game
Add the game element below to MY existing game, which you have not seen. It is a finished module file given with this prompt:
- `damage-pop.js` (one global, `GameDNA_DamagePop`), API reference `damage-pop.README.md`
README example names are placeholders.
## Shared premises
1. **Include each module file verbatim; never edit it.** Load it with its own `<script src>` before the game's script, or paste it unchanged into its own `<script>` tag. If a module seems to need a change, adapt my game around it and tell me.
2. **Resolution:** keep my game's native resolution and integer scaling as they are. Call module draw functions on my 2D context inside the same transform as my sprites (one module pixel = one game pixel), and keep my game's own image-smoothing setting (off for pixel art, on for smooth or HD games; never switch it).
3. **Time:** drive every module from one fixed 60 Hz step (1000 / 60 ms). If my loop uses variable delta time, accumulate it and run whole steps (at most 250 ms per frame).
4. **Coordinates:** native screen pixels (world minus camera) unless a section says tiles.
02

A prompt to copy

Plain English, written for a game your agent has never seen. Paste it into Claude Code, Codex, Cursor or any coding agent.

JSdamage-pop.js56 KB · one file · no dependencies
MDREADME.mdthe API, for your agent to read
const pops = GameDNA_DamagePop.create({ getAnchor });
pops.spawn('imp', 47, 'crit');
03

A module your agent wires in

The hard part is already written and tested. Your agent connects it to your game's own events, so your code stays yours.

Combine them

Many elements, one prompt.

Put elements in the basket and it writes one prompt that adds them all in the right order. Start from a kit:

COMBO.md · 224 lines
# Add WebGL post-process pipeline, Dynamic 2D lights & soft shadows, Bloom & glow, Colour grading LUT and Camera director to my game

Add the 5 game elements below to MY existing game, which you have not seen. Each is a finished module file given with this prompt:

- `webgl-post.js` (one global, `GameDNA_Post`), API reference `webgl-post.README.md`
- `dynamic-lights.js` (one global, `GameDNA_Lights`), API reference `dynamic-lights.README.md`
- `bloom-glow.js` (one global, `GameDNA_Bloom`), API reference `bloom-glow.README.md`
- `color-grade-lut.js` (one global, `GameDNA_ColorGrade`), API reference `color-grade-lut.README.md`
- `camera-director.js` (one global, `GameDNA_Camera`), API reference `camera-director.README.md`

README example names are placeholders.

## Shared premises

1. **Include each module file verbatim; never edit it.** Load it with its own `<script src>` before the game's script, or paste it unchanged into its own `<script>` tag. If a module seems to need a change, adapt my game around it and tell me.
2. **Resolution:** keep my game's native resolution and integer scaling as they are. Call module draw functions on my 2D context inside the same transform as my sprites (one module pixel = one game pixel), and keep my game's own image-smoothing setting (off for pixel art, on for smooth or HD games; never switch it).

5 elements → 1 prompt

The basket checks that they fit together, orders them, and writes one prompt plus a zip of the module files.

Open in the basket

How it works

Three steps

  1. 1

    Play and pick

    Try the demos. Change the settings until it feels right; the prompt follows your values.

  2. 2

    Hand it to your agent

    Copy the prompt and give your agent the module file and its README. For several elements, use the basket.

  3. 3

    Play your game

    The agent wires the element to your game's own events. Each prompt ends with checks it can run, and every prompt has been tried by a fresh agent on a game it had never seen.

Start in 5 minutes · How we test: every element's review score and its runs on unseen games, failures included. · How Game DNA works: what an element is, how it is tested, and what went wrong on the way.

Start with one

Modern damage numbers: hits arc out, crits pop, combos roll into one total.

Play the demo