Alex's Tetra             axchos@yahoo.com
by Alex Cho Snyder       Author of Dragon

My math teacher unwittingly assigned the class a little programming
project for solving triangles. Well, actually he knew that I am
good at programming, so he said that I had to solve for every single
possibility. At least that's what I thought I heard him say. He
didn't know what he was in for (and neither did I, it turns out!)
Almost 10 hours of coding/testing/debugging later, I had a fancy
custom made interface and a working triangle solver. But of course
I had to add something to show off (or actually before I even
started the solver). So I had also made a secret game called Tetra,
which takes up about half the code of the program.

The triangle solver menu is very nifty. It fixes any errors you
might type in, and when displaying the results, it clips the
decimal digits to fit on the screen. You can cancel your entries.

To get to the game, you enter 4 for each side, and then when
prompted for the fourth side, enter 64773, which looks like the
word GAME (G=6 A=4 M=77 E=3). The game is a puzzle game vaguely
like Dino Puzzle (Yoshi). It is based on the menu system of the
triangle solver, so you control a triangular cursor to block and
unblock rows with the 2nd key. The purpose of toggling the rows
is to let good items fall through and block bad items. Blocked
rows are represented with a box by your cursor. The items are:
1 point, 5 points, Extra life, Minus life, Faster, and Slower.
The items shoot across the screen randomly, and the closer the
column of items is to your cursor, the more often they fire.
The point is to get the highest score, which is saved in a list.


(^=delta, o=box, .=cross)

^ - Your cursor
o - Blocked row

. - 1 point
+ - 5 points
* - Extra life
o - Minus life
< - Faster
> - Slower


Controls -

(in menu)

Arrows - Move cursor up and down

2nd - Enter value/confirm entry

Mode - Exit/cancel entry

Del - Erase value/backspace

Numpad and . - Type value

(in intro)

2nd - Continue to next screen

Mode - Skip intro

Del - Exit

(in game)

Arrows - Move cursor up and down

2nd - Un/block selected row

Mode - Save and exit

Del - End game and exit


Programming -

Vars - (descriptions given are for the engine only)

X - Your cursor vertical coord
Y - Game speed/column position (3 to 16)
Z - Temporary var
0 - Temporary var

LTETRA - Saved game/high score list (dim=11)

LTETRA(1) - Lives (starts at 7)
LTETRA(2 to 7) - Item type for each row
LTETRA(8) - Score