Programming 2 games: Android Nim and Obstacle
#1
Edit: You can already download Android Nim in the 2nd post below

Programming 2 games: Android Nim and Obstacle.
Android Nim was originally programmed in 1979 by Leo Christopherson on the TRS-80 model 1, 3 and 4.
And in 1981, I bought the book 'TRS-80 Programs' by Tom Rugg and Phill Feldman. There I saw the program Obstacle that I modified by adding sound, keeping scores, etc.
Today, 40 years later, both programs were reprogrammed in QB64, both completely in text-mode (screen 0).
More info when the programs are ready. Here are 2 screenshots of each program.

Android Nim:
   

   

Obstacle:
   

   
Reply
#2
Here is the first playable version of Android Nim.
Only the EXE for now. There are probably still some adjustments to be made, such as maximizing the screen (see https://staging.qb64phoenix.com/showthread.php?tid=655).


.zip   AndroidNim.zip (Size: 806.16 KB / Downloads: 30)
Reply
#3
Nice!

Christopherson was the master of using machine language subroutines with Basic on the TRS-80.

I had Dancing Demon and Voyage of the Valkyrie (both by Christopherson) back in the day, but not Android Nim.

I like the way you're packing graphics block characters into the source code in strings; very TRS-80-like.
Reply
#4
I was still relatively young during my TRS-80 period. I also did not understand everything about the English language because Dutch is my mother tongue.
Eventually I learned String Packing (relatively easy) and Line Packing.
That Line Packing was ultimately Z-80 machine language on a Basic line. With a "LineFinder" you could go to that line. That LineFinder was always on line 2 at a fixed address. The LPRINT statement was redirected to that LineFinder. So LPRINT CHR$(5) went to line number 5 where there was a particular SUB in machine language.
Unfortunately, Line Packing had many drawbacks and was difficult to maintain.
Later came new techniques such as the Magic Array, which you could also apply in QuickBASIC.
Reply
#5
Shocked 
My friends & I were never aware of that LPrint trick.  I may have to try that on an emulator.
Reply
#6
Line Packing works perfectly in an emulator.
You could never have a Z-80 Assembly routine on line 10 or line 13 because LPRINT treated it as a CR and LF.
Also in LinePacking you should never use an opcode zero or variable zero because a zero is actually the end of your BASIC line.
So if you wanted to fill the screen we did LD HL,3C00 but the code contained a 00h. So we had to change this to LD HL,3C01 and then a DEC HL.

So you had to pay attention or you would crash your program while programming  Big Grin
Reply
#7
Months ago I wanted to make a Youtube video about the operation of Line Packing and String Packing.
But I don't have a decent microphone and by the way, how many people are still interested in such "old" TRS-80 applications?
Reply




Users browsing this thread: 2 Guest(s)