Dec 232017
Very nicely done Tetris clone. Very faithful to the original.
File TETRIX.ZIP from The Programmer’s Corner in
Category Games and Entertainment
Very nicely done Tetris clone. Very faithful to the original.
File Name File Size Zip Size Zip Type
TETRIX.DOC 8492 2275 deflated
TETRIX.EXE 77022 36868 deflated

Download File TETRIX.ZIP Here

Contents of the TETRIX.DOC file

March 1990 - Steve McBride

TETRIX was written from scratch in MicroSoft QuickBASIC and uses no
reverse-engineered code from the original game. TETRIX is committed to
the public domain as of this writing.

It is an attempt at making some modest improvements to the original
TETRIS because my copy has so many bugs. A few of the more obvious
improvements are;

o save scores to disk
o requires no graphics card
o ability to slide blocks together
o does not crash the system on exit

After UNZIP'ing the command to play is: TETRIX n

where n is a number that coorosponds to the speed of your system. It
is used to calculate a delay to make the game more playable. The
following table can be used to get an idea. If your machine has a math
co-processer, a turbo kit of some kind, or any other speed enhancement
device some adjustments to these numbers will be necessary.

System speed Command
------- ------------
4.7 Mhz == TETRIX 5
8 Mhz == TETRIX 8
10 Mhz == TETRIX 10
12 Mhz == TETRIX 12
25 Mhz == TETRIX 25
33 Mhz == TETRIX 33

In actual practice any number from 1 to 99 can be entered so use what
ever feels best to you. The left and right arrow keys move the block
left and right. The down arrow key will move the block to the bottom
position instantly, and the 'K' key rotates the block. The program
will write scores to a file named TETRIX.FIL, contents are in ASCII

Most of the stuff I write is used one time for some utility type
purpose, then discarded / forgotton in some back alley of my hard disk.
So when I put this together, and had some friends tell me it was
actually kind of fun to play -- I decided to upload it to compuserve.
Questions or comments are welcome.

Enjoy ...

Steve McBride
Compuserve [71540,1125]

The following is some technical data about the program for those who
are interested.

** Psuedo-code for tetrix **
Tetrix 'Program driver contains header info
main 'Main module of program
setup 'Display initial game screen
init 'initialize main game array
(prepare block) 'main program loop starts
rand2 'get random number for which block to send
scorkeep 'display block statistics
rand1 'get random number for version of block
(send block) 'loop for a single block
params 'scan keyboard for input parameters

chkspt 'check main game array for available spot
putblk 'put block on screen
markspt 'mark main game array with coordinates
delay 'slow down action so possible to play
params 'during delay routine - scan the keyboard
checkrow 'see if a row was completed
reorg 'if so, reorganize the main game array
savscr 'game over -- write score to file

'** Module breakdown **

Module name Subroutine Description
----------- --------- ------------------------------------------
TETRIX tetrix Program driver contains header info
and initial copyright screen.

TTMAIN main Main module of program

TTSETUP setup display initial game screen

TTUTILS init initialize main game array
rand1 get random number for version of block
rand2 get random number for which block to send
delay slow down action so possible to play
debug disabled in final version - displays binary
contents of game array

TTSCRKEP scorkeep display block statistics
savscr high score file maintenance

TTPARAMS params scan keyboard for input parameters

TTCHKSPT chkspt check main game array for available spot

TTPUTBLK putblk put block on screen

TTMRKSPT markspt mark main game array with coordinates

TTCHECKR checkrow see if a row was completed
reorg reorganize the main game array

'** Block version map **

The dot is positioned to show where PUTBLK, and CHKSPT calculate the
location for placement on screen, and in the main game array. Each
successive version of the block is a 90 degree turn clockwise. The game
itself was modified to make blocks turn counter-clockwise in order to be
compatible with the original TETRIS game.

v1 v2 v3 v4

. . . .

Block 1

. . . .
Block 2

. . . .
Block 3

. . . .
Block 4

. . . .
Block 5

Block 6 . . . .

. . . .
Block 7

 December 23, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>