FOR CREATORS
https://cdn.tailwindcss.com/https://cdnjs.cloudflare.com/ajax/libs/matter-js/https://cdnjs.cloudflare.com/ajax/libs/three.js/https://cdnjs.cloudflare.com/ajax/libs/howler/<iframe sandbox="allow-scripts"> (an opaque origin) with a strict CSP, so
fetch, eval, and document.cookie do not work.
localStorage is replaced with a memory-only polyfill that empties on every
reload — never use it for high scores or save data.
parent.postMessage({ type: 'gameOver', score }, '*').This covers the technical requirements above. Paste it into an AI chat as-is to generate a game.
Build a single HTML5 mini game for PUNIPO (https://punipo.com). Follow every rule below.
- Everything must be in one self-contained HTML file: CSS and JavaScript both go inside that same file. Do not load anything external, except optionally one of these approved CDN scripts if you need it: https://cdn.tailwindcss.com/, https://cdnjs.cloudflare.com/ajax/libs/matter-js/, https://cdnjs.cloudflare.com/ajax/libs/three.js/, https://cdnjs.cloudflare.com/ajax/libs/howler/. Plain JavaScript with no library at all is preferred.
- Keep the finished file under 1 MB (it may grow up to 5 MB once an allowed CDN script is inlined).
- The game runs inside a sandboxed iframe under a strict CSP: fetch, XMLHttpRequest, eval, and document.cookie do not work. localStorage is replaced with a memory-only polyfill that empties on every reload — never use it for high scores or save data.
- Never fix the screen to specific pixels or a fixed aspect ratio. Read the real width and height of the screen and adapt to it, so nothing letterboxes or gets cut off on tall or wide screens.
- When the game ends, call parent.postMessage({ type: 'gameOver', score }, '*') with a numeric score.
When it is done, publish it at https://punipo.com/create. fetch data — the CSP blocks all network access.When you're ready, submit your game from /create. Common questions are answered in the FAQ.