Monday, 27 March 2017
2 PRINT@A+B*32," ";:A=A-1:NEXT:GOTO22
4 PRINT@A+B*32," ";:A=A+1:NEXT:GOTO22
6 PRINT@A+B*32," ";:B=B-1:NEXT:GOTO22
8 PRINT@A+B*32," ";:B=B+1:NEXT:GOTO22
20 FORZ=1TO65000:PRINT@A+B*32,"X";:REM SOME ENEMY ANIMATION AND COLLISION DETECTION
22 REM GAME OVER
This is a simple example of how you can use NEXT to return from subroutines. Since key input in an arcade game can be quite intense, you want to shave off every micro second possible in your main loop. NEXT:GOTO20 might some more kludgy than a clear RETURN but the GOTO20 part is almost never reached and the NEXT returns directly to the first command after the FOR/NEXT loop definition at the beginning of line 20. Using a FOR/NEXT loop saves you a GOTO in every iteration of the loop and all the scanning it requires to find its line number! Not to mention the interpreter having to scan for RETURN (a six letter command) rather than NEXT (a four letter command) for each subroutine call. Also, for each subroutine call you don't have a RETURN and then a NEXT (or GOTO) command to get back to the beginning of the loop. You accomplish both with the one NEXT from your subroutine.
Sunday, 26 March 2017
There is my adventure called "The Doctor," which involves navigating an overhead 2-D maze. You have to trick the very dumb Darlecs to chase you and then trigger reactors and exit the screen, leaving them to be blown up.
A contest like this, which involves a bunch of classic 8-bit home computers spanning the entire 1980s reminds me that my beloved MC-10 was based on the TRS-80 Color Computer (Coco), which was a system built on hardware from before the lat 70s. In particular its graphic chip the Motorola MC6847 was a particularly early graphic chip for home computers. Don't get me wrong, I love this neon green wonder. I also appreciate how well Tandy worked at maintaining compatibility across its whole Coco line right into the 1990s. The Coco 1 (1980) was a contemporary of the VIC20. The Coco 2 (1982) was a contemporary of the Commodore 64. The Coco 3 (1985) was a contemporary of the Atari ST. Yet each of these machines was able to run the software from the earlier machines. The VIC20, for example, wasn't around in 1985 running a multi-user, multitasking operating system. But a Coco 1 (upgraded to 64K) could. And the MC-10 was a part of this venerable family.
The program was based on some code from a type in book for the Matra Hachette Alice. I was browsing through it and saw that it was a flight combat game. I had seen the other games for the contest and I had been wanting to make an updated flight shoot-em-up game for some time. But I was really disappointed when I saw what the game code produced.
The program has the idea of the four white blocks to make a cross hair, but other than that the plane is just two blocks connected by a dash. And the sky is orange with the plane leaves behind a trail of different coloured blocks as it jigs around the orange sky. One shot on the plane brings victory and the end of the game, but the plane moved in increments of two making its flight extremely jerky and erratic. I kept the basic gun shots converging on the target idea and the 4 block cross hair, but replaced just about everything else. The book "102 Programmes Pour Alice et TRS MC/10," which can be found here: http://alice32.free.fr/documentation/102-programmes/102-programmes.djvu
See page 166 for the original. Here's my code in short and long form:
8 ?@0,"YOU GOT HIM! ":SOUND219,9:SOUND241,7:SOUND200,9:SC=INT(10000/(TI+SH)):IFSC>HSTHENHS=SC
9 ?@16,"SCORE"SC:PRINT"HIGH SCORE"HS:PRINT@48,;:INPUT"HIT enter";M$:GOTO0
10 REM USE A,S,W,Z TO STEER
20 REM SPACE TO FIRE
30 REM 5 HITS TO SHOOT DOWN
Monday, 13 February 2017
I decided to try programming the classic puzzle game "Minesweeper." I managed to get the game boiled down to 10 lines of Micro Color Basic on my favourite computer, the TRS-80 Micro Color Computer (MC-10). The original version of the program only did a 4-way search (up,down,left,right) for doing the flood fill after you select a location:
However, as with so many of my programming projects, a little more effort allowed me to condense the program just that wee bit more to allow me to fit in a full 8-way search:
Type CLOAD & hit ENTER. From the File menu select “Play Cassette File…” and then select SWEEPER.C10 in the JimG subdirectory of the Cassette directory. Type RUN...
(Any trouble running it, make sure under the “Configure” menu that Memory is set to +16K Ram Expansion).
I should note that these instructions will work for getting any of my games to run, since all of the rest of my programs are also included in the JimG subdirectory of the zip compilation. This compilation includes the wonderful VMC10 emulator by James the Animal Tamer. Thanks so much James!
20 REM minesweeper
21 REM ***********
22 REM BASIC 10LINERS CONTEST
23 REM http://gkanold.wixsite.com/homeputerium/basic-10liners-2017
24 REM BY JIM GERRIE 2017
25 REM USE A,S,W,Z & SPACE.
26 REM AVOID THE 10 MINES.
27 REM WHEN DONE, HIT SPACE
28 REM ON A MINE TO SHOW MINES.
In addition to the Sweeper game, last year I made a game based on a suggestion from someone from Brazil who commented on one of my programs a while back. He told me about a game he had made when he was a kid. Érico also sent me an image that had reworked using his old machine. He also described a little how it worked. Based on his recollections, I came up with another game, which I was able to cram into 10 lines in the hope of entering it into the NOMAM 2016 competition, but I was too late. So here is the "Monteiro Challenge," an arcade space flying game with 3 levels to get through, for this year's competition:
Anyway, I don't know if any of these game are any good as games, but they sure were a lot of fun to program. Thanks to Gunnar and the folks at the NOMAM retro event for organizing a great competition. Have fun in Lubeck this year!
I had been hoping to get a car game going for the contest, But I can't for the life of me think of how I can get a game dynamic that wont sap the speed of the basic algorithm that I came up with for drawing a moving road graphic. I'll keep plunking away at it. It's called Formula1:
In addition to this program I have been busy lately making some ports of old code from other systems and reprogramming efforts based on videos I have seen. For example, RRUNNER.C10 is a game based on a Sinclair ZX-81 game, which can be seen on Villordsutch's page: https://youtu.be/0zJr3wPoi70.
Here is a modification of some code by my friend Robert Sieg from the MC-10 Yahoo group that draws a friendly frog. I was always intrigued by the starring white eyes of the frog and decided to animate them to make a version of what I call MC-10 Hynotoad:
Quite a bit of programming work had to go into converting a game from QBasic that recreated the Mattel Football classic handheld game from the 1970s. The Qbasic code was by bomberpunk. See this thread for info http://atariage.com/forums/topic/9013... and a vid of the original: https://youtu.be/jNKgpAFOsa0
In addition to the above I have also completed the following projects since I last posted:
Island of Secrets
Island of Secrets is a type-in listing in the book of the same name, which is a free PDF available for download from Usborne Publishing: https://usborne.com/browse-books/features/computer-and-coding-books/ As well as the listing the book contains an illustrated background story to the adventure. Some of the illustrations contain information that may aide the adventurer. I ported it from Commodore 64 version I found on-line. However, there were some bugs in it which prevented it from being winnable (or even playable). I fixed'em. Here's a video of a 64 version. Don't know if its the same one: https://youtu.be/Tstl9kjhpUE
Re-programming of Plunkit for the TRS-80 Coco by Roger Taylor. My MC-10 version was based on the Highretrogamelord video: https://youtu.be/1MFm7_zPTG8
Aardvark Software text adventure, ported from Commodore VIC 20 to TRS-80 MC-10. For original see: https://youtu.be/ulh2QWDoeSQ
A closer examination of the source has prompted some alterations to how the maze is drawn. Now level choice influences the amount of free space present on screen.
VicTron Port of Tron by F. G. Huerta
Originally for the Commodore VIC 20. This is a port of the program to Micro Color Basic for the TRS-80 Micro Color Computer. For the original see: http://blog.nanomuelle.com/2012/03/08/tron-3-0/
Port to the TRS-80 MC-10 of a game for the Acorn Atom by Dino Dini called "CupBall." For the original see: https://youtu.be/Uwsm7TcvUao
Awful Green Things for the TRS-80 MC-10
Ported an Acorn Atom version of this classic board game to MC-10. See here for more details about the original: https://youtu.be/Es6WmwWxh50 (GREENTHI.C10)
Ported from Acorn Atom to the TRS-80 MC-10. Original Basic source by P. Mainwaring, Sept 1981
Sniper 1K Game
Ported from a Sinclair ZX-81 1K games compilation. See: https://youtu.be/aANxm-v7P_M
(SNIPER.C10 in the 4K directory of JimG)
Orbit 1K Game
Ported from a Sinclair ZX81 1K game compilation. See: https://youtu.be/YPP-RhYWCUs
(ORBIT.C10 in the 4K directory of JimG)
Escape from Colditz
From the World of Stewart, a teenage software creation re-imagining escape from the famous WW2 POW camp. See: http://worldofstuart.excellentcontent.com/world/scorpion/scorpion.htm
Jet Pac for the TRS-80 MC-10 based on an ZX81 game you can see here:
Basic game ported to TRS-80 MC-10 from Apple 2 game found at: http://www.atarimagazines.com/compute/issue57/bowling.html
Saturday, 26 November 2016
I ran across an interesting looking game ported to the MZ-80 by Joachim Froholt. He mentioned in the blurb for his YouTube vid that:
I translated Takaya Arita's Sharp MZ-80K classic Cavern 2160 to the Sharp MZ-80A (& english).
Dr Takaya Arita’s game is a milestone release from 1980 – it has been considered “the original sandbox game,” and is a strategic digging game that arrived a good couple of years before the likes of Dig Dug and Mr Do. 36 years on, Mindware is now releasing the game on PC, in three different forms. The original version for the Japanese Sharp MZ-80 computer will be converted, and two remixed versions will be provided – one built to the specs of the Sharp MZ-700, and another built as a classic Eighties arcade game.
BTW, I see your last project was The Valley, that's a fun coincidence,
because I was involved with a version for the Sharp MZ-80A just
recently. I only did playtesting for that one. An interesting little
game, more fun than I originally thought it'd be. Here's a video:
|Commodore 64 Version|
|TRS-80 MC-10 Version|
Nuclear Submarine Adventure was a text adventure published in 1980 by Aardvark Software. Its author was Robert J. Retelle, who also wrote the Star Trek Adventure that I ported recently. Versions exist for the C64/128, OSI/Compukit, TRS-80, TRS-80 and CoCo. It seemed time to make a version for the MC-10. The source code was provided to me after an inquiry to the Coco e-mail list, by Guillaume Major, who oversees the Coco Archive. I found out about the game because Colin Appleby of the Grundy Newbrain Emulator site, asked me on solution archive forum whether I had the source. That sent me to Curtis Boyle's Coco game website. An inquiry to Curtis via the e-mail list (maintained by Dennis of maltedmedia.com) prompted him to respond that he couldn't place his finger on a copy of it, but the posting prompted Guillaume to hunt up a copy from some obscure disk and put it up on the archive. That's a lot of work being done by a lot of different people sharing across the internet to facilitate the retrocomputing hobby!
Anyway, SPOILER ALERT! Below I have included a walkthrough and a map thatI created as I game tested the ported source code. I had to simplify all the fancy music. This included a routine that ran a submarine "ping" noise while you are prompted to enter your command. No great loss... I found the ping a little annoying.
I think I found an error in the save routine. It didn't seem to preserve the variable that recorded that you had used the chair to smash open one of the hatches. So every time you saved you had to get the chair again and re-smash the hatch. I added that variable to the save routine. I also added the synonym "GET" for the "TAKE" command, and the options to use U,D,F,A as shorthand for GO UP,GO DOWN,GO FORWARD and GO AFT.
Room Room Room Room Quarters Room
/ / /
/ / /
Tool Battery Flooded
Room Room Compartment
About the Story
You are trapped in a crippled nuclear missile submarine and must make your escape.
GO UP,OPEN CABINET,TAKE BOARD,GO DOWN,PUT BOARD,COMPUTER,GO FORWARD,LOOK SINK,TAKE GLOVES,GO AFT
GO DOWN,TAKE BATTERIES,GO UP,GO FORWARD,OPEN HATCH,GO FORWARD,PUT ACID,DROP BATTERIES,DROP GLOVES
HOLD BREATH,GO DOWN,OPEN LOCKER,GO UP,HOLD BREATH,GO DOWN,OPEN CHEST,TAKE SCUBA,LOOK LOCKER
TAKE LANTERN,GO UP,TAKE CHAIR,GO AFT,GO AFT,FIRE TORPEDOES,OPEN HATCH,HIT HATCH,CHAIR,GO AFT
GO AFT,DROP CHAIR,LOOK UP,GO AFT,GO DOWN,TAKE SLEDGEHAMMER,GO UP,GOR FORWARD,HIT PIPES
SLEDGHAMMER,LIGHT LANTERN,DROP SLEDGEHAMMER,GO FORWARD,GO FORWARD,GO FORWARD,GO FORWARD
TAKE GLOVES,GO AFT,GO AFT,GO DOWN,TAKE ELECTRIC,GO UP,GO FORWARD,GO FORWARD,SHOO EEL
DROP ELECTRIC,GO FORWARD,OPEN TUBES,GO TUBES
Monday, 14 November 2016
I think, from what I have read that this classic RPG was first published in Computing Today April 1982. I was able to get a listing and based on that and the viewing of many pictures of various versions, I realized that the Newbrain version had departed from the original in some ways. The most obvious was that instead of having two castles at each end of the central "path," the Castles were simply placed randomly. Also, the map was redrawn every time you entered the valley scene from one of the other scenes (Swamp, Forest, Tower). By pouring over the original listing I was able to restore the game's function to be more like the original Pet version. I was also able to clean up the graphics quite a bit, such as making the castles look a little more like castles and the tower more like a tower. Adding better collision detection also prevents attribute clash between these elements. Now the save game feature actually saves the map info so the valley remains steady from saved game to saved game. Lots of other minor fixes too. Here's how it looks now: