Load Matter.js from CDN, define static and dynamic bodies, rotation limits and win zones. Great for “get the ball in the bucket” puzzles.
Generate a 2D physics puzzle for Windows with these specifications.
Features: import Matter.js from CDN (https://cdn.jsdelivr.net/npm/matter-js); 800×600 world; adjustable gravity; goal: ball into green zone; five levels: ramps, chain, seesaw, fan with Body.applyForce, dominoes; restart button; optional FPS overlay; no other frameworks.
Rules: win on sensor overlap; clean teardown on restart.
Tech: HTML5, ES6+ JavaScript; single index.html.
Windows: Edge or Chrome.
Optional: Pygame + Pymunk with the same levels in JSON.
Build the same physics puzzle as a Windows desktop app.
Features: Pymunk + Pygame; same five levels; load from levels.json; restart with R.
Tech: Python 3.10+; main.py; requirements.txt (pymunk, pygame).
Run: python main.py after venv.
Include: level clear message and optional timer.