---
name: loveaigame
description: Publish a browser game to LoveAIGame, or remix an open-source game listed there into a new version. Use when the user says "publish this game", "put it on LoveAIGame", "remix <game>", or wants to enter a LoveAIGame game jam.
---

# LoveAIGame

LoveAIGame is a directory of browser games made with AI. Games stay hosted on the maker's own URL;
LoveAIGame lists them, embeds them, and tracks remix lineage. Replace `HOST` below with the site origin
you were given (the page this file was downloaded from).

If the LoveAIGame MCP server is connected (`HOST/api/mcp`), prefer its tools
(`publish_game`, `get_remix_brief`, `search_games`, …) over raw HTTP — the fields are identical.

## Publish a game

1. Make sure the game is deployed at a public `https://` URL and loads without a login.
   If it is not deployed yet, deploy it first (GitHub Pages, Vercel, Netlify, Cloudflare Pages).
2. Confirm with the user what will be published: URL, title, author name, and whether the
   source is open (repo URL + licence) and the prompt may be shown publicly.
3. `POST HOST/api/v1/games` with JSON. Only `url` is required; send what you know:
   `title`, `tagline` (≤160 chars), `description`, `genre`, `tags`, `ai_tools`, `author`,
   `repo_url`, `license` (SPDX id such as `MIT` — omit when the repo has no licence),
   `prompt`, `jam` (slug of a running jam).
4. The response contains `game.page` and `manage_key`. Write the key to `.loveaigame` in the
   project root, add `.loveaigame` to `.gitignore`, and never print the key in logs or commits.
5. Report `game.page` to the user. `409` means the URL is already listed — show them the existing page.

To edit later: `PATCH HOST/api/v1/games/{slug}` with `Authorization: Bearer <manage_key>`.

## Remix a game

1. `GET HOST/api/v1/games/{slug}` and read `open_source`, `license`, `repo_url` and `remix_brief`.
2. If `open_source` is false, do **not** copy the code or assets. Offer to build an original
   game inspired by it instead, or to ask the maker for permission.
3. If it is open source: clone the repo, make the user's change, keep the licence file and add
   a credit line linking the original page.
4. Deploy, then publish as above with `"remix_of": "{slug}"` plus your fork's `repo_url`,
   the same (or a compatible) `license`, and the `prompt` you were given for the change.

## Leaderboard (optional)

Add `<script src="HOST/sdk.js" data-game="{slug}"></script>` and call
`LoveAIGame.gameOver({ score })` at the end of a run.
