The Klingon's make no comments in this version. Animations run pretty fast on my MC-10. Here's a vid:
Here are a few comments about my version of the code modified for the MC-10 (on Github). The comments refer to the code snippet just above them. My MC-10 version has removed all ELSE commands and changed all PLAY commands to simpler SOUND commands. Also all STRING$ commands have been replaced by literal strings, since graphic characters can be input directly from the MC-10's keyboard.
2 IFMID$(M$,C2,1)<>""ANDMID$(M$,C2,1)<>" "THENC2=C2-1:GOTO2
The above is my 32 character word wrap routine. I use it for all printed messages instead of inserting spaces in them. It's also more flexible when it comes to messages that change length, such as when you have STR$() numeric data concatenated with a string.
If you need to fiddle to adjust the speed of the game because of differences in your machine from the original Coco version (I'm pretty sure the TI is probably faster), change the 150 value above to something higher if your machine is slower or something lower if your machine is faster. This is the countdown for the "pings" of the view screen, as in the original Star Trek show.
The ON/GOTO in line 580 is in the middle of a FOR/NEXT loop. As far as I can tell the jumps to 595 and 594 originally simply jumped out of the FOR/NEXT loop never to return. I just hate not closing nex loops on principle, and they can occassionally cause problems if they occur too often, so I added a temp variable and lines 595 and 594 to gracefully exit the loop before proceeding on to the original GOTO lines.
There was a rare problem where a photon torpedo hit would seem to register twice (two explosions in a row). I think this may have been a result of not gracefully exiting the for next loop as soon as the "hit" Klingon is found (why keep searching the other locations). So I added I=3 after the torpedo is found to hit one of the possible 3 Klingons that can be in any Quadrant.
950 GOSUB1580:[email protected]
,;:M$="WELL DONE! STARBASE DESTROYED!":GOSUB1:B=B-1:BT=BT-1:M2=4:X=C:Y=D:GOSUB1550
951 [email protected]
,;:M$="THE EXPLOSION HAS THROWN YOU OFF COURSE":GOSUB1:GOSUB1350:[email protected]
I changed the word "DAMAGE" to explosion. Seemed to make more sense. Also added a pause (GOSUB1350) and a [email protected]
statement after the message, since occassionally more messages might occur that fill the screen beyond the 16 line limit of the MC-10.
1090 [email protected]
,"LAST BATTLE-CRUISER DESTROYED!":GOSUB1700:PRINT"THE ";U$;" IS SAVED!!":GOSUB1700:SOUND75,5:SOUND80,5
1091 PRINT"YOUR EFFICIENCY RATING ="INT(K7/(T-T0)*1000):END
Added a call to line 1700 for a little moise when you win. Seems anti-climatic otherwise. Line 1700 in the original listing seemed to be an orphan anyway, so I tweaked it for a more congratulatory sound.
1110 A=0:GOSUB380:[email protected]
1131 [email protected]
1150 O=0:AF=0:FORA=40TO266STEP32:[email protected]
,"STATUS REPORT:";:[email protected]
1151 [email protected]
1170 AF=0:[email protected]
,"ENTER START AND END CO-ORDINATES":[email protected]
When in the computer OPT mode, if you select TORPEDO DATA and then select any other options beside GUIDED TORPEDO, you garble the variables used to store your TORPEDO firing info. So I added the AF (autofire) variable switch to all the Computer options to turn off the autofire option if you don't select it right after selecting the TORPEDO DATA option. Now GUIDED TORPEDO will only work if you select it right after selecting the TORPEDO DATA opt.
This line is the one added to the TORPEDO subroutine to prevent firing (and possible infinte loop) unless the AF variable is set to 1.
The above poke just switches the screen of the MC-10 to orange from regular green to give a flickering screen effect when you are hit.
1520 T=T+.5:[email protected]
This is the stardate countdown. It used to read T=T+1, but since the Coco is slower than an MC-10 I had to have it count more slowly (by .5s) or the game expected you to play at to high a speed to be fair.
1561 GOSUB1550:GOSUB1420:[email protected]
,"KLINGON AT"STR$(INT(X))","RIGHT$(STR$(INT(Y)),2)" DESTROYED";
I added the check in 1560 above to prevent the problem mentioned above of double explosions from torpedo hits on some Klingons. If the hit registered twice the K variable could go to a negative number which really messed up the modification of the 3 digit number (i.e. 100s, 10s, 1s) calculated in 1550 used to store each Quadrant's info G(Klingons, Starbases, Stars).
The peeks in this routine above (17024) and 17025 are simply the way for the MC-10 to determine the screen location of the current cursor loation (0-511). It is used to print blanks of a particular length from that location to the 2nd last position of the screen (i.e. to clear the message area but not print in the bottom right corner so as to cause a linefeed for the entire screen).
This line was an orphan in my listing of the program. So I modified it and use it in the win routine to provide a little sound.