The game

Nine holes, par 36 and 2,990 metres, played from behind the ball with a wireframe perspective view and a plan view beside it. It is from 1983 and it is written entirely in BASIC.

The turn

Every shot goes through three chained screens, all on the same button:

  1. The club (subroutine 1000). Thirteen: three woods, seven irons, the pitching wedge, the sand wedge and the putter. The pad cycles round.
  2. The direction (subroutine 1100). Degrees, five at a time with left and right and ninety at a time with up and down. The lower compass needle follows along.
  3. The power (subroutine 1200). A bar that rises and falls on its own eight pixels at a time; the button freezes it. The higher it stops, the harder the shot: the sum is PW=INT((192-PW)/9), giving 0 to 20. Behind it, line 230 takes one off and will not go below 2.

What decides where it lands

The launch speed is the power times the club's factor - 250 for the driver, 85 for the putter - plus the wind's head-or-tail component. The perpendicular component is kept separately as side spin, and on every pass of the flight it bends the angle a little: that is why shots curve.

The wind is drawn once per hole (subroutine 9060): any direction from 0 to 359 and a strength from 1 to 9. Within a hole it never changes.

The flight is an ordinary projectile with gravity 9.8083 and fixed time steps of 0.4. When the height goes negative the ball bounces: it keeps 40 % of the speed and 70 % of the angle. With a launch angle under 8 - a putt or a low shot

and keeps 85 % of the speed.

The terrain

The game has no terrain map: it asks the screen. Line 380 takes the ball's position over to the plan view in the right-hand panel and reads with POINT whatever colour is painted there. That colour IS the terrain:

colourterrainwhat happens
0roughrough stance, no penalty
1the holeputting stance
2the fairwaynormal stance
3the greenputting stance
4watertwo strokes and a drop nearby
6out of boundstwo strokes and a drop nearby
13a treeslows sharply and keeps bouncing under it
14a bunkersand stance, and it stops dead

When a drop is needed (subroutine 3000), the game searches in circles of growing radius - fifteen at a time, twenty-four points per turn - until it finds a valid colour.

Rules that live in the code, not the manual

The course

holepardist.bunkerswatertrees
14373 m4-2
23155 m2-2
34332 m2yes1
45441 m2yes1
54376 m1yes1
64365 m1yes1
74328 m1yes2
83138 m1yes2
95482 m1yes2

Hole 2 is the only one with no fairway: tee straight to green. And holes 1 and 2 are the only ones without water. The pars add up to 36, which is the total the scoreboard writes by hand in line 7530.