Microgolf gets you in the swing
Feeling a little under par? Well why not drive away the blues
and putt yourself onto our green - we've got this game off to
a tee!
By F. McPHERSON
HAVE you ever wondered what on earth it is that people see in
knocking a little white ball about in the pouring rain?
Well our MicroGolf program is a fantastic simulation of the
sport. All the thrills, frustrations and irritations of the original
game are here - all bar the rain, that is.
Firstly, you decide how many holes you wish to play. You are
then given a plan and a cross-section of each hole.
From this you must decide the direction and weight of club you
need to get on the green. Once on the green you have to get into
the hole.
The weight of the club varies between 1 and 30. You specify
the angle by giving it in degrees between 0 and 360, where 0 is
vertically upwards, 90 horizontally right and so on.
If you land in a tree you lose a shot, and you then have to
go round it without hitting it again. If you land in the rough
you have to hit the ball twice as far to go the same distance.
When you have completed the required number of holes you are
given a scorecard showing each hole, how long it was and how many
shots you took.
To aid those of you who can't resist tinkering with programs,
we've included an outline of the lines, procedures and main variables.
Lines and procedures
Line 10 Turns off auto repeat.
Line 20 Turns off the escape key for all operating systems.
Lines 30-100 Sets up the beginning procedures.
Lines 110-180 Main loop, which calls up other procedures.
PROChitball This firstly asks for the direction and club size,
then moves the ball and checks if it hits a tree or where it lands.
PROCsetup This draws the plan view and sets up the colours and
some of the variables.
PROCsqu Colours in a specified square.
PROCgreen When you land on the green this procedure draws the
enlarged green, with the hole and the ball on it.
PROChoriz Draws the cross-sectional view of the hole.
PROCdoneit When you have completed the hole this procedure tells
you how many shots it took you.
PROCcharset Defines all the characters.
PROCdrclub Draws the club.
PROCgolfer Draws the golfer and also makes his club swing.
PROCintro Prints up the introduction.
PROCd Waits for key to be pressed then clears the screen and continues
with the program.
PROCdrfarway Draws the fairway.
PROCscorecard Prints up the score-card.
Main variables
S% Shots taken.
HO% Number of the hole being played.
G% A flag that is set when the ball is on the green.
D Direction of the ball.
C Club size.
J% Y coordinate of the cross-sectional golf ball.
X & Y Coordinates, of the plan view, of the golf ball.
P0%, Pl% Colour of the screen just in front of the ball.
MX%, MY% Coordinates of golfer.
XG%, YG% Coordinates of the green.
XH%, YH% Coordinates of the hole within the green.
L% Distance between tee and hole.
CX%, CY% Coordinates of the end of the club.
HOLES Number of holes the player requested to play.