Back to Game Forge

Let kids type their own ideas

For grown-ups. This switches on AI building, so kids can type any idea and Claude builds it. You pay for each game built with your own Claude API key, and daily limits keep that small. About 20 minutes, once. Tick each step as you finish it.

Best on a computer

Do steps 1 to 5 on a laptop or desktop. Cloudflare's code editor is very hard to use on a phone (pasting often doesn't work). Step 6 is quick and is done on each iPad or phone the kids use. Something look different from these steps? Cloudflare changes its menus now and then; the names in bold are what to look for.

Keep this page handy

Your ticks are saved, so you can leave and come back. The Claude Console and Cloudflare buttons open in a new tab. To come back here, tap Safari's tabs button and pick this page, or use this address:

Opened this from inside another app, like Claude or Messages? Tap Open in Safari (or the compass icon) first, so your ticks stay put. Lost it anyway? Open Game Forge and tap Continue AI setup.

0 of 6 steps done

1

Get a Claude API key

  1. Open the Claude Console and sign in. It's separate from the Claude app. If you sign in with Google, always use Continue with Google next time too.
  2. Under Billing, add prepaid credits, like $10 or $20, and leave auto-reload off. That's your spending cap: when the credits run out, AI building just pauses until you add more. No surprise bills.
  3. Tap Get API key. If a box asks Where does your code run?, pick Somewhere else (the key icon, at the bottom).
  4. Name it gameforge. Set Expires to Never, so it doesn't stop working in a month. Leave the other choices as they are, and tap Create key.
  5. Copy the key right away. It's only shown once. Best: create it on the same computer you'll use for Cloudflare, and keep the window open until step 4.

Missed copying it? You can't see it again, and that's fine: make a new key, and delete the unused one on the API keys page. Keep the key private. Never put it on GitHub, in the game, or in a text or photo.

2

Make the AI server

  1. Sign up free at Cloudflare.
  2. Go to Workers & Pages. On Cloudflare's home page, tap the Search box, type Workers, and pick Workers & Pages (sometimes called Compute (Workers)). Or tap the three-line menu at the top left.
  3. Tap Create, then make a Worker from the Hello World starter.
  4. Name it gameforge-ai and tap Deploy. You'll land on your worker's page, with tabs like Overview, Settings and Deployments. Its address is shown near the top, like gameforge-ai.yourname.workers.dev; you'll need it in step 6.
3

Paste in the Game Forge code

  1. Click Copy the code below.
  2. On your worker's page, click Edit code at the top right (it may only show </> Edit). If it's cut off, make the window wider or zoom out with Cmd and minus (Ctrl and minus on Windows). Or use the Open the code editor button below.
  3. A code editor opens with a file called worker.js. Click inside the code, press Cmd+A (Ctrl+A) to select it all, then Cmd+V (Ctrl+V) to paste over it. The new code is about 64 lines and ends with };. The box on the right may still say "Hello World!" until you deploy; that's normal.
  4. Click the blue Deploy button at the top right. The page barely changes; that's normal too. To get back to your worker, click gameforge-ai at the top left.

Stuck on a phone? The editor often won't let you paste ("Unable to read from the browser's clipboard"). Switch to a computer for steps 3 to 5; your ticks stay on this device, so just tick them again there.

4

Add the settings

On your worker's page, open the Settings tab. Next to Variables and Secrets, click + Add. Add all four in the same window: fill in the first, then click + Add under it for the next. The names must match exactly, in capitals.

NameANTHROPIC_API_KEYValueSecretYour API key from step 1
NameALLOWED_ORIGINValue
NameDAILY_LIMIT_PER_DEVICEValue (games per device each day)5
NameDAILY_LIMIT_TOTALValue (games for everyone each day)50

For the API key, tick the Secret box at the right of its value, so nobody can read it back. Leave the other three as plain text, and leave Production ticked. Then click Add 4 variables and deploy. Afterwards the list shows the key as Value encrypted. A yellow box about Wrangler configuration may appear; ignore it and close it.

5

Switch on the daily limits

Two parts: first make a small storage box, then connect it to your worker.

  1. Make the box. In Cloudflare's far-left menu, scroll to Storage & databases and click Workers KV (or type KV in Quick search). Click Create, name it gameforge-limits, keep Standard, and click Create. It says "no entries"; that's normal, it fills up on its own.
  2. Connect it. Go back to Workers & Pages, then gameforge-ai, then Settings. Next to Bindings, click + Add binding, choose KV namespace, and click Add Binding. (Ignore the sample code it shows.)
  3. Variable name: type LIMITS, all capitals, with the S. This is not the box's name. Under KV namespace, pick gameforge-limits. Click Add Binding.

The list says "No KV namespace found"? You haven't made the box yet; do part 1 first. Typed the name wrong? A binding can't be renamed: click the trash can at the right end of its row (zoom out if it's hidden), then add it again. When Bindings shows LIMITS → gameforge-limits, Cloudflare is finished.

6

Switch it on

  1. Copy your worker's address from the top of its Overview tab in Cloudflare. It looks like https://gameforge-ai.yourname.workers.dev.
  2. Paste it here and tap Save and test. When it works, a blue line under the buttons says Connected! AI ideas are on for this device. It's easy to miss, so look just below the buttons.

Kids on another iPad or phone? This step switches AI on only for the device you're using. On each device the kids use, repeat just this step (about 1 minute). Steps 1 to 5 never need doing again.

  1. On your device, copy the worker address, then AirDrop or text it to the kids' iPad. If both use the same Apple account, you can copy it on one and paste on the other.
  2. On the iPad, open your Game Forge link in Safari.
  3. Tap Create a game, scroll down, and tap Let kids type their own ideas.
  4. Come to this step 6, paste the address, and tap Save and test.
  5. When it says Connected!, tap Go make a game.

Want a Home Screen icon? In Safari, tap Share, then Add to Home Screen. Then open Game Forge from that icon and do this step again inside it: the icon keeps its own settings and its own saved games, separate from Safari. Have the kids always use the icon. If the browser's history and website data are cleared, AI switches off; just repeat this step.

Two kids at home? The per-device limit counts by internet connection, so iPads on the same Wi-Fi share it. To raise it, in Cloudflare go to your worker's Settings, click the pencil next to DAILY_LIMIT_PER_DEVICE, change 5 to 10, and deploy.

Run your own copy of this site? Turn it on for everyone

In your site's GitHub repo, tap Add file, then Create new file. Name it ai.json, paste the text below, and commit.

Check how much you've spent any time in the Claude Console.

Back to Game Forge