Coding Golf
Coding Golf is a complete round of golf seen from directly overhead. Each of the 18 holes is a twisting strip of fairway surrounded by deep blue sea, and the goal is to reach the cup in as few strokes as you can. You pick a club, line up the shot and stop a swing meter at the right moments.
Jasper Renow-Clarke, who goes by picosonic, made it for the js13k game jam in 2020, where the whole entry had to fit in 13 kilobytes. It plays in any desktop browser tab and needs a keyboard or mouse.
How to play Coding Golf
A panel in the top-left corner lists yards to the pin, your stroke count, par for the hole and the club in your hands. Par ranges from 3 to 6 depending on length. An orange line shows your aim and how far the current club will carry, from 278 yards with the 1 Wood down to 10 yards with the putter.
Swinging takes three presses of Space, Enter or the mouse button. The first starts the meter, the second sets power as the needle rises, and the third sets accuracy as it falls back, ideally right at 0. Letting it pass 100 picks the power for you and sends the ball a bit off line.
Water costs a penalty stroke and returns you to where you hit from. Sand traps stop the ball, and the next shot out loses power and drifts. Once the ball rests within roughly 2 yards of the cup, it drops, and you get a result such as Birdie or Bogey.
Controls
| Action | Keyboard | Mouse | Touch |
|---|---|---|---|
| Start a round or close the scorecard | Space or Enter | Click | — |
| Rotate aim | Left and Right arrows | Scroll wheel | — |
| Change club | Up and Down arrows | — | — |
| Swing (start, power, accuracy) | Space or Enter, three times | Click three times | — |
| View scorecard | S | — | — |
Tips
- Check the wind arrow in the top right before every shot, since it changes after each stroke. Into a stiff headwind, take one more club than the distance suggests.
- Stop the power needle a little short of 100 instead of chasing a maxed-out swing. Overshooting adds a random sideways miss.
- Most fairways bend, so play to the corner rather than straight at the flag. A direct line often crosses water, and a splash costs more than an extra safe shot.
- Switch to a wedge or the putter well before the green. The wedges cover roughly 30 to 115 yards, so a long club this close will fly the hole.
- Look for bunkers guarding the front of greens and land short of them or past them. Shots out of sand can veer up to 10 degrees.
If you like Coding Golf, try these
Mini Putt ParkShorter holes with bumpers, angled walls and a moving gate make this a quick nine-hole break.
Gravity GolfGolf in outer space, where planet gravity bends each putt toward a tiny red marker.
Questions
Can you play Coding Golf on a phone?
Not really. It is built for a keyboard or mouse and has no touch controls, so a laptop or Chromebook works best.
How do you swing in Coding Golf?
Press Space, Enter or click three times. The first press starts the meter, the second locks power on the way up, and the third locks accuracy as the needle comes back toward 0.
Why is there no music in Coding Golf?
The two background tunes used note data taken from a 1980s commercial game, so that data was left out and the game plays without music. Everything else works as the author made it.
More like this: all sports games · every game A–Z