Click Here To Go To The Your Computer Archive



Written By David Griffin


Cover Art
Click Here To Enlarge Loading Screen

Loading Screen
Click Here To Enlarge Opening Screen

Opening Screen
Click Here To Enlarge Screenshot

Game Screenshot

Introduction

Fag in mouth and beer in hand, David Griffin goes for the bull's eye

Darts is a game for the BBC Model B or 32K Model A, and although not tested will probably work on an Electron.

The game of darts once only played in its traditional home of the pub and club is now an international sport frequently seen on television. It is one of the most popular participant sports in this country, and indeed the world, played by millions.

My computerised version is by no means a substitute for throwing arrows from the oche down at your local but an alternative to arcade-type games requiring manipulation of at least eleven of your fingers and very quickly, a feat not suitable for some of the more elderly BBC users!

It is difficult to emulate the same skills of the darts game proper on a computer game and so the method of aiming and throwing darts I have employed is to manoeuvre a crosshair sight over the board, throwing a dart when it is over the place you want. A skill element is introduced with the sight drifting and so making it more difficult to hit the number you require. The game was written with joysticks in mind, although I have provided for keyboard use.

There are three different games to play in my program, the standard game, around the clock and all fives. All are for two players.

The standard game - options 1 and 2 on the main menu: Option 1 provides a standard 301 game with double start and double to finish, played over five legs, i.e. the first to win three games wins the match. The difficulty level decides how much the sight drifts, level 1 is the easiest.

After the board has been drawn, both players should enter their initials or three-lettered pseudonym. The scoreboard shows initials, how many legs each has won - shown by 'L=', - and the score required for this game.

As each dart has been thrown the display to the bottom right of the screen shows what it has scored.

Option 2 allows the parameters to be altered, giving games such as 801 straight off over 3 legs and 101 double start over 9 legs.

Around the clock - option 3: In this game each player goes around the board, throwing at 1 until hit and then at the 2 etc. and ending on the outer bull - 25 - and then the bull's eye - 50. It is possible to aim for singles, doubles or trebles depending on your initial choice. The scoreboard shows what each player must throw for next, with sgl, dbl or tbl printer under initials.

All fives - options 4 and 5: Option 4 gives the standard all fives game. Each player must score a multiple of five for this three dart total throw, for example: 55, 25 etc. If he misses the board with one of his darts the throw is not counted. Then the number of fives scores is calculated, that being his score for that throw - a score of 45 counds as 9, 10 as 2 etc. - and taken from his initial 51 points. A throw resulting in a score that is not a multiple of five is not allowed. The match is over five legs.

Option 5 allows parameters to be changed, so the game can become all threes or all eights etc.

An unusual feature in the programming of darts is the use of two Basic programs resident in the machine at the same time, the main game - listing 4 - and a routine to draw the dartboard - listing 3. The reason for this was to allow myself an extra three pages of programming space. The memory soon got full while developing the game, even after relocating PAGE to &D00. I couldn't start the Basic program below this because of the user-defined characters stored between &C00 and &Cff, so I chopped part of the main program off and stored it between &900 and &BFF; this area is free when files, RS423 and function keys are not used. Then Page only needs to be changed to pass control from one program to the other. See line 60 of listing 3 and line 80 of listing 4.

To enter the program and store it on cassette in the correct order, the following procedure should be followed:

  1. Type in listing 1
  2. Save with SAVE "DARTS" (RETURN)
  3. Type in listing 2 and RUN it
  4. Type in PAGE=&900 (RETURN)
  5. Type in listing 3
  6. Save with *SAVE darts 900 D00 (RETURN)
  7. Type in PAGE=&D00 (RETURN)
  8. Type in listing 4
  9. Save with SAVE "darts" (RETURN)

Important - omit lines 1, 2 and 3 from each program.

I would advise saving listing 2 on a back up cassette. In case of deformed characters it will be possible to track them down and repair them.

It would be helpful to replace line 10 of listing 4 with:

10MODE7:ON ERROR MODE7:REPORT:PRINT" at line ";ERL:END

while the game is developed to trap any typing errors.

For a complete working copy, without the effort and strain of a couple of hours at the keyboard, send 3.75 or 2.75 plus blank cassette plus SAE to David Griffin, 31 Apsley Road, Oldbury, Warley, West Midlands B68 0QY. The game is also available on Prestel via the pages of Viewfax 258.

Program Notes

10 - 150 Main control program.
80 jumps to small program stored between &900 and &BFF to draw dartboard
160 - 550 Standard game and all fives routine
330 all fives missed a dart
360 all fives not a multiple of five
380 fanfare on 180
400 cross off old score
560 - 860 Around the clock routine
770 hit bull's eye
780 hit outer bull
810 cross off old score and print new score
870 - 950 Get players' names
960 - 1030 Get word at position(X,Y) of length L
1040 - 1060 Open text window for player P's scoreboard
1070 - 1090 Close above windows
1100 - 1240 Throw three darts routine
1110 print marker darts
1190 check for individual game end of throw
1210 - 1230 rub out darts
1250 - 1480 Throw a dart 1270 - 1350 move sights until fire pressed
1380 print dart
1390 work out distance and angle of dart from the centre of the board
1410 find which number dart has hit
1490 - 1510 See if space bar or fire pressed to throw a dart
1520 - 1570 get movement of sight from keyboard or joystick
1580 - 1680 additional trimming for dartboard display
1690 - 1770 set up variables and arrays
1720 - 1740 put SINs and COSs in arrays for fast circle drawing
1750 - 1760 order of numbers around dartboard
1780 - 1880 draw sight
1819 - 1910 print M$ in double height at (X,Y) in colour C
1850 See User Guide p462
1920 - 1940 wipe out n characters at (x,y)
1950 - 1970 delay for t seconds
1980 - 2020 print 'press space bar'
2030 - 2410 instructions and menus
2420 - 2450 get key but only one of those characters supplied by K$