Mini Golf
Canvas mini golf with drag-to-aim shots, power calculation, collisions, hazards, scorecards, and local best score.
- Status
- Archived experiment / live demo
- Last updated
- May 2026
- Controls
- Drag from the ball to aim and set power, then release to shoot.
- Keyboard
- Space/Enter starts, P/Escape pauses, R restarts, and N advances after a clear.
- Touch
- Touch-drag aims and shoots; Prev, Next, Pause, and Restart buttons remain visible for hole navigation.
- Accessibility
- Live status, progress, lie, and power readouts describe the current run, while the canvas remains a visual playfield.
Ready
Mini Golf ready.
Keyboard and touch controls
Keyboard shortcuts
- Space / EnterStart the round when the menu is visible.
- P / EscPause or resume the round.
- RRestart the current hole.
- NAdvance to the next hole after a clear.
Touch and pointer controls
- Drag from ballAim and set shot power, then release to shoot.
- Prev / NextMove between available holes.
- Pause / RestartUse the on-screen buttons below the course.
Touch-drag from the ball to aim, then release to shoot.
Course data, shot physics, and score state.
Main state tracks hole, ball, aim, strokes, surface, scorecard, and best score. Physics runs only while the ball moves.
Five-hole course logic, shot physics, and score feedback.
- Created five course layouts with par values, walls, hazard zones, surface types, cup targets, and hole progression.
- Implemented drag aiming, shot-power calculation, ball motion, wall/hazard/cup collision checks, and stroke counting.
- Built scorecard UI, best-score persistence, pause/restart/fullscreen controls, touch hints, and hole navigation.
Uses standard Canvas/browser APIs and familiar mini-golf rules; layouts, state, and UI are custom.
Archived experiment with a clear course loop.
Solid: drag aiming, progression, collisions, hazards, scorecards, and touch. Hardening: physics tests, mobile QA, save controls, and nonvisual feedback.
No-build game page with course config in JavaScript.
GitHub Pages serves mini-golf.html, mini-golf.css, and mini-golf.js. No env vars or external APIs beyond browser APIs and LocalStorage. Local: run python -m http.server 8000 and open /mini-golf.html.