8. Light Bikes


General Description

This game is just for fun. The user instructions are displayed when the program is run. The object of the game is to survive for as long as you possibly can. You must imagine that you are riding a light bike which produces a wall behind you as you progress around the screen. If you crash into one of these walls both you and the wall will vaporise. Good luck!

Detailed Description

   Lines 11-12 Displays title and asks how many players are going to play, also this is the first part of the delete trick.
   14-18 It first goes to the procedure to set up variables then to the procedure to display the game board, then to the procedure to get movement from the keyboard.
Line 16: if computer is still playing then jump to procedure to make his move.
Line 17: go to procedure to move all the players.
   19-25 Procedure for displaying title, and jumps to procedure to ask user who is going to play.
If L = 0 then left player is playing.
If R = 0 then right player is playing.
If CP = 0 then computer is playing.
   26-34 Sets up variables.
SP = speed.
LX, LY are the coordinates of left player.
RX, RY are the coordinates of right player.
CX, CY are the coordinates of the computer.
LDX, LDY are the direction of the left player.
RDX, RDY are the direction of the right player.
CDX, CDY are the direction of the computer.
LD, RD are the direction of each player (they are used to stop user turning back on himself!).
   35-47 Described in Lines 19-25
   48-55 Display game board.
   56-66 Get user movement from keyboard.
      
 For left player For right player
  Up   Up
    P
 Left A  D Right Left ;   : Right
    /
  Down   Down

   67-88 Make computer choose move.
Lines 70-73: the random number Q decides which direction he will choose if he has not hit a wall.
Line 74: Jumps to procedure to see if he might hit a wall if he goes that way.
Line 75: If he hasn't hit a wall then end procedure.,
Line 76-82: Evasive manoeuvres.
   84-90 Procedure to check if computer will hit wall.
   91-119 Procedure to move players.
Lines 93-95: If player is still alive then add direction to his movement.
Lines 96-100: If left player is still alive check to see if he has hit an invisible trail left by another player crashing, if so, ignore it, otherwise he has hit something, set L = -1.
Lines 101-109: Similar to Lines 96-100, but for different players.
Lines 110-112: If player has just crashed e.g. L = -1 or R = -1 or CP = -1 then make their wall invisible and make a sound, also let L or R or CP = 1.
Lines 113-115: If players are still alive then put them on the screen.
Lines 116-118: Check to see if there is a winner.
   120-126 If winner then say who it is.
   130-240 Display instructions
   250-280 Second part of delete trick.
   290-360 Credits.