ztrack − simple curses‐based pseudo‐3D driving game


Ztrack is a simple curses‐based pseudo‐3D driving game. It’s
loosely based on an old LCD game, I think it was Casio’s
"Turbo Drive", that I used to spend far too long playing. As
such, the graphics are fairly simplistic, but what do you
expect from a curses‐based driving game!?

You have to get as far as you can down an infinitely long
three‐track road populated with stupid, but dangerous,
computer‐controlled cars.  You score most for doing it at
your top speed of 150 MPH, but you can do it more slowly if
you enjoy doing pointless boring things.

     Cars can’t crash into you from behind, but you can
crash into them from behind, and you can also crash by
moving into a lane already occupied. Though you can’t
directly see cars level with you (that thing down the bottom
is your bonnet/hood in case you hadn’t figured it out), the
things which happen to look like square brackets are in fact
the edges of your wing mirrors, and a blob appears in these
when a car is level with you in the relevant lane.

     You get three lives/cars, so when you’ve crashed three
times it’s game over.

Rather than holding a button to accelerate etc. which is
clearly rather impractical, you instead set an acceleration
mode. This can be any of ’accel’, ’decel’, or ’const’. The
latter is basically a perfect cruise control. Q sets accel
mode, A sets decel mode, and Space or Tab set const mode. O
moves left a lane, P moves right a lane.

Ztrack needs at least an 80x24 screen. It doesn’t bother
aborting if the screen is smaller, and doesn’t use any more
if the screen is bigger.

     There’s no sensation of speed apart from the cars. This
is a bit tricky to do much about.

     The computer car logic is virtually non‐existent. It
gets sufficiently fast that this isn’t too much of a
problem, I think. :‐)

     Computer cars don’t crash into each other, and even
move through each other.

     You can be really dull and not floor it if you want. I
can’t think of a reasonable way to fix this. Possibly remove
const mode?


     There should probably be a persistent high‐score table
based on average speed, then as a tie‐breaker, on distance

     There aren’t any police cars, but I can’t remember what
they actually did anyway. :‐(

     The high score is only for the current ’session’ ‐ quit
the program, and bang goes the high score. This reflects how
meaningful the score is. :‐)

Russell Marks