
Build with AI Tools
Any capable AI coding tool can build a Game: describe the game, generate it, validate against the platform rules, iterate, and upload.
The universal workflow
The same five steps in every tool: Claude Code, Codex/ChatGPT, Lovable, Google AI Studio (Gemini), Cursor, Copilot.
- Describe: paste the prompt below with your game concept filled in.
- Generate: the tool produces a complete project with
index.htmlat the root. - Validate: with the Minit MCP server connected, ask it to fetch the live rules (
minit_get_requirements) and validate the build (minit_validate_build); otherwise see "Validate before you upload" below. - Iterate: play it on a phone, then feed back specific, concrete changes.
- Zip and upload: follow the upload step in Your First Game.
The prompt
Paste this into any AI tool and fill in the game concept:
I'm building a game for the Minit Games platform: a feed of short, instantly
playable HTML5 mini-games that run full-screen in a mobile WebView.
Read and follow every hard requirement on this page before writing code:
https://minit.studio/docs/platform-requirements
It covers the bundle format and size limit, viewport and rendering rules,
forbidden APIs, required SDK calls, controls, and gameplay rules.
Working style:
- Plain HTML, CSS, and vanilla JavaScript. No React, Vue, or other
frameworks, and no build step, unless I explicitly ask for one.
- Completely self-contained: no CDN scripts, no external requests; embed
all assets or draw them in code.
- Project folder with index.html at the root.
- Touch/pointer input only; a portrait layout that adapts to any portrait
aspect ratio.
- Signal readiness when the game can be played, and call
window.minit.reportResult(score) exactly once when the game ends.
GAME CONCEPT:
[Describe your game: mechanics, win/loss condition, difficulty, visuals.]
Generate complete, ready-to-run files.
Start from a template
Instead of generating from nothing, hand your AI tool one of the official starter templates, with structure and SDK wiring already in place:
- minit-template-vanilla: plain Canvas/DOM, smallest possible bundle
- minit-template-pixi: PixiJS, fast 2D sprite work
- minit-template-phaser: Phaser, scenes and physics out of the box
- minit-template-three: Three.js, 3D
Clone the template (or point the tool at the repo) and say "start from this template". The prompt above still applies for everything else.
Validate before you upload
With the Minit MCP server connected, ask your tool to validate the build against the live platform rules. Without it, sweep the generated code yourself:
- Search for
localStorage,sessionStorage,fetch(,XMLHttpRequest, and any externalhttp(s)://URL. None belong in a Game. Per-player persistence goes through the SDK (see Saving User Data). - Confirm the game signals readiness and calls
window.minit.reportResult(score)exactly once at the end. See Game Ready Signal and Reporting Results. - Confirm
index.htmlsits at the root of the project folder, and later at the root of the ZIP.
To play in a desktop browser, mock the SDK in the console:
window.minit = { reportResult: (s) => console.log('Score:', s) }
Then test on a real phone: serve the folder locally (python3 -m http.server 8000) and open it over the same Wi-Fi, or use a preview link.
Warning: If the tool generated a build-step project (a
src/folder, apackage.json, avite.config.*), upload the built output: run the build, then zip the contents ofdist/soindex.htmlis at the top level of the ZIP.
Iterate with specifics
- Ask for numeric changes ("make enemies spawn 30% faster"), not "make it better".
- Paste browser-console errors verbatim and ask for the fix.
- Re-run the validation pass after any substantial change. Regenerated code can re-introduce forbidden APIs.
Per-tool gotchas
- Lovable: defaults to React. Demand plain vanilla HTML/CSS/JS up front; if it still generates React, ask for a rewrite without any framework.
- Google AI Studio (Gemini): put the Minit Games constraints in the system instructions so every turn honors them. Upload a phone screenshot and ask for specific layout fixes; multimodal iteration is fast.
- Codex / ChatGPT: review the generated code; it likes to slip in
localStorageandfetch()calls. Watch for unnecessary library imports.
Keep it small
Aim well under 1 MB: AI-generated games rarely need heavy assets, and small bundles load instantly. The actual cap is far larger (see Platform Requirements).
Next steps
- Run the validation pass one last time.
- Test on a real phone in portrait.
- Zip with
index.htmlat the root and upload it. - Collect player feedback and iterate with the same loop.