Physics puzzle with Matter.js: chains, seesaws and targets
Load Matter.js from CDN, define static and dynamic bodies, rotation limits and win zones. Great for “get the ball in the bucket” puzzles.
Ready-to-use Cerewro prompt
Cerewro Chat — HTML5 (browser on Windows)
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.
Cerewro Chat — Python 3 (Windows desktop)
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.
How to get the most out of it
- Ask for a JSON level editor workflow to iterate without touching the engine.
- Tune gravity per level if the ball feels too slow.