New Game Development
What self respecting computer can not play a version of Tetris? Well, the Aquarius has lacked this title for long enough! I have taken it upon myself to give our overgrown calculator computer some badly needed self respect.
The title of the game is "Fall of the Eastern Blocks" It has taken me a few months to put this game together in my free time. The going was more difficult than I anticipated. But slowly the game kept evolving as I overcame one programming obstacle after another. I have done things which I believe have never before been achieved in basic on the Aquarius. The first one is: in game scoring. This is not generally done on the Aquarius, because there is no "locate" command to move the cursor freely about the screen. Instead you usually receive a score update between rounds, or after the game ends. The second major achievment, and perhaps most importantly for a Tetris style game is: continuous keypress. Normally in Aquarius Basic when you read the keyboard with "inkey$" the machine will only register one entry per press. For example if I wanted to move my game piece over two spaces to the right, I would have to press and release the "r" key twice. While I would still be able to make a Tetris game in that manner, there would be a failure to caputure the true feel of the game. Thanks to the Aquarius technical documentation I received from Andrew, I was able to locate a byte in memory used for "keyboard debounce control." I thought this was the North West passage to the solution of my "inkey$" problem. Ultimately it was, but not as I expected. When I peeked that location, it always contained a value of "4." Logically, I thought that number corresponded to the minimum release time before the machine would register the next key press. (about 1/2 second by my estimate) So I started experimenting with changing the value at that address. The test program I used was:
10 poke14350,0 (The address and value I am playing with. I thought 0 would mean "no delay")
20 x$=inkey$ : Printx$ : goto 10
Results were no good. So I changed the value of 0 to different numbers which I thought would be significant, such as powers of 2 and the like. Still no results. Then I decided to be thorough and try all 256 values one at a time. Here was my next test program:
10 x=0
20 x$=inkey$ : If x$=Q THEN POKE14350,X : X=X+1
30 PRINT X$
40 GOTO 20
An admittedly crude way to test each value, then increment to value by 1 every time I press "Q". However, I believe that if I hadn't chosen such a peculiar format, I may never have stumbled upon the solution to my problem. (normally, I'd have put the "X=X+1" before the poke) As soon as I hit that Q key to increment the value, I saw a whole slew of Q's shoot up the screen! I did it!!! For whatever reason, this ONLY works if the poke immediately follows the IF...THEN... statement referencing the string variable created by inkey$. I freely admit that I do not understand how or why this works, but I am not complaining! ;-) You can poke all you want anywhere else in the program, and Aquarius will only register one keypress at a time. Now, my Tetris game was going to feel more like Tetris.
![]() |
![]() |
I did my best to replicate the play mechanics of Tetris. I used the Gameboy version as my model. All told, I believe I came pretty close to duplicating that which is "Tetris" even considering my complete "noviceosity" with programming. When I play, I actually score very closely to my average score and lines in the Gameboy version. I tried to get the piece percentages to match as closely as possible, but this gave me trouble. The Aquarius random number generator is anything but random. I had to implement some forced measures to keep the piece orders from repeating everytime you reload the game. And this aggravated my problems with the balance of piece percentages.
The programming accomplishment I am most proud of is the line removal and update routine. It took me a LONG time to get it right, but I finally nailed it. There were quite a few times I had decided to leave it alone, because I couldn't do it any better, but I kept going back to it. Eventually it paid off. Although the pictures don't look impressive, this game flows smoothly and cleanly. It behaves like you would expect Tetris to behave.
The title is, of course, a play on words. The theme of the game is that you are trying to tear down the Berlin wall to open up democracy, but meanwhile communist hardliners who fear change are trying to drop new blocks and rebuild it. Undoubtedly, you will eventually lose the game, but you achieve marter status and others carry on your mission after you're gone. Cheesy? Well, maybe. But it's still a cool title!! ;-)
The finished game weighs in at around 16K, ouch! And to think I originally wanted to keep it under 8K;-) The printout on the Aquarius printer is over 7.5 feet long. Load time is around 5 minutes.
Send me an email for order information.