Oozeman

By Chris Dewhurst

Originally published in EUG #45

You are Oozeman, and you must build a pipeline across each of the floors of the factory.

Various pipe sections appear in the black square in the centre of the screen. You can push these pieces around by moving beside them and pressing the appropriate direction key. A new pipe joint appears in the box when you push the previous one out, but pressing the Control key will change the one currently in the box. You may also 'bounce' sections off the walls (if one becomes wedged in a corner, for instance).

You can construct the pipeline however you choose, but:

  1. It must start and end at the two drains down the left and right edges of the screen,
  2. You must use a minimum number of pieces, "do" (displayed at the top of the screen).

Score, level, time remaining and the "do" number are displayed at the top of the screen. When the timer reaches zero, the flow begins! Points are awarded for each section of piping through which the liquid flows, and if it flows out of a disconnected end, there will be an explosion and you lose the game. The timer may be advanced by pressing Escape, and if the liquid flows successfully from one side of the screen to the other, bonus points are awarded for time remaining.

The game runs in Mode 1 and is in two parts. "OOZE1" assembles the machine code for printing pipe characters, and initialises the fonts. The fonts are called "OFONTS" and sprites "OSPRTS". The font variables in page 3 are adjusted so that page &C holds the data for ASCII characters 64-95, instead of 224-255, providing a new alphabet. OOZE2 is the main game. The program was written for the BBC B/Master, but should run on the Electron ("OOZE2" can be sped up by removing the delay loop in line 510).

Game Controls

A - Left, S - Right, L - Down, P - Up, CTRL - Advance timer, ESCAPE - Start flow

Variables

d1% Y co-ordinate of left drain.
d2% Y co-ordinate of right drain.
E%Explosion flag; TRUE if disconnected pipe joint found when liquid flowing.
hn$()High score table names.
hs%()High score table scores.
L%Level number.
M%Address of machine code routine that prints the sprites.
M%()Map of screen.
md%Direction of player e.g. 0=facing upward
mx%,my%Co-ordinates of player
Q% Time left when Escape pressed.
S%Score.
S%()Points to add, 5 for straight piping, 10 for bends.
T%Time remaining.
V%()List of two valid directions that the liquid must be flowing in for it to enter section of pipe.

Procedures And Functions

bounce Bounces pipe segment off the wall.
check Checks if pipe section is correctly joined to previous section, if not set explosion flag.
col(A%) Changes text colour, A%=&bf where b=background, f=foreground colour.
dhst Displays high score table.
flow(C%) Adds points for pipe section through which liquid flows, adjusts flow direction using C% for curved piping.
keys Checks for key presses and if new pipe section needs to be put in the box.
liquid Begins flow of liquid through piping.
logo Prints the OOZEMAN logo made up of pipe sections.
lt,rt,up,dn PROCs for moving left, right, up and down.
man Calls the machine code to print the man.
ooze Prints relevant liquid character to fit into straight or curved pipe sections.
pipe Selects random pipe segment to put into box.
score(A%) Adds number of points A% to score.
screen Sets the colours, draws border, level and score display
set Sets up the variables for the next level.
shst(A%) Searches high score table for place to put last score A%, if player has got into the table, add their score to the table and input name.
time Decreases timer using TIME variable as a delay.
dt(A%) Subtracts A% seconds from timer and displays time.
z(A%,X%) Prints X% zeroes before number A%

Christopher Dewhurst

Unfortunately, Oozeman requires a system where PAGE is at &E00. If your system eats any memory, you will need to transfer the files to tape or DFS to be able to use them.

Dave E, EUG #45