Mini Golf

About this game Mini Golf

Development notes

The browser never reports the score

Rules and physics live in one file that both the page and the server load. It skips trigonometry and Math.hypot, whose last digit can differ between JavaScript engines, and uses only + − × ÷ and square root, which IEEE 754 defines exactly. The server re-rolls every submitted round from its integer inputs and keeps only what the replay proves.

Daily holes are frozen by date

The date is hashed into a seed that picks three holes and whether to mirror each. I limited the draw to the first 12 holes, so holes added later can't change a past day's course or the scores its rankings and challenge replays re-roll to. First Putt is left out as too easy.

Slow motion that leaves the replay alone

When you putt, a copy of the ball runs up to 72 ticks ahead with the same physics. If the copy drops, the last moments before the cup are drawn slower (about 0.3× for eagle or better, 0.42× for birdie, 0.65× for par); the real ticks and the replay stay unchanged.

Practice changes one thing

The drill locks either the angle or the power at the previous attempt's value, so the only difference between the dashed path (last try) and the solid one (this try) is the value you moved. 'Closer than last' needs at least 0.1 m, so a rounding tie never counts as progress.

Updated:

Play now →