# Adding a new game

Everything lives in `games.json`. Add a new object to the array:

```json
{
  "id": "unique-slug",
  "title": "Game Title",
  "category": "arcade",
  "author": "Creator name",
  "description": "One sentence about the game.",
  "thumb": "assets/thumbs/your-thumb.svg",
  "type": "iframe",
  "src": "https://itch.io/embed-upload/XXXXXXX"
}
```

- `id` — unique, no spaces, used in the URL (`play.html?id=...`)
- `category` — used to auto-build the filter buttons, so reuse existing categories (`arcade`, `puzzle`, `platformer`, etc.) where it makes sense
- `thumb` — a small image or SVG, ideally 4:3
- `type` — `"local"` for a game file you wrote yourself (point `src` at a local HTML file, like `games/snake.html`), or `"iframe"` for an embedded game
- `src` — the file path (local) or embed URL (iframe)

## Getting a legit itch.io embed URL

1. Open the game's page on itch.io.
2. Check the game actually allows embedding — not every creator turns this on. If there's no embed/iframe option shown, it isn't licensed for that and shouldn't be pulled in.
3. Where available, itch.io provides an embed snippet with a URL like `https://itch.io/embed-upload/XXXXXXX` (or `https://itch.io/embed/XXXXXXX` for the with-details version) — grab that exact URL and drop it in as `src`.
4. Set `type` to `"iframe"`.

## What not to add

Don't pull in games (Flash or otherwise) from other "unblocked games" sites, ROM/SWF archives, or anywhere the creator hasn't explicitly allowed redistribution. If a game doesn't have a real embed/redistribution option from its own creator, it doesn't belong in `games.json`.
