Sunday 23 February 2020

2020 Basic 10-Liner Entries and Asimov Awards

Asimov Awards Entries

It's that time of the year when I turn my attention to converting some of my MC-10 BASIC programs into Coco and Dragon 32 programs. Diego Barizo has added some impetus for this task by way of his 2020 Asimov Awards. In past years he has held the contest at the Chicago Annual Last CocoFest. I hope someday to be able to attend a Fest. Until then, sending my programs to Diego will have to suffice. It's a little bit of virtual participation.

This year I have collected together some programs I have been working on most recently on the MC-10. All of them were in somewhat unfinished states. My puzzle game SolChess is based on a popular smartphone puzzle game and also real chess board game, "Chess Solitaire."  Here's the board game:

It's a lovely little game. My version has 40 of the standard puzzles. However, the game was completely silent and I had always planned to have some musical refrains for success and failure. So when my son Charlie came home for his midterm study break I availed myself of his musical skills.  He put together two Russian tunes, since that country seems especially connected to Chess.


For a lark I also translated a brief little joke quiz game with silly MC-10 questions. It's called "QuizNite" and the graphic of the title screen is borrowed from a similar image from some kind of activity in honour of the Dragon 32 held in the UK. The approach to getting the questions right is to look for the answers that are the most unlike the others, most silly, downright false, or some combination thereof. Only the true masters of MC-10 will succeed first time.


The other entries are arcade games. My Space Mouse game was inspired by a classic arcade game for the Japanese 8-bit NEC PC-6001. As I have investigated that game further I realized that the premise of the game is that you are supposed to be a cat climbing a tower infested by invading space mice. I must have interpreted some Google translated Japanese website info incorrectly (perhaps the use of the singular "mouse" in the translated title confused me into thinking a mouse was the central character). In my version, you are the mouse and you are climbing a launch tower in order to stow away on the rocket before it launches.  You must avoid the dangerous objects rolling down the power, which have been shaken loose by the pre-launch vibrations.

If you complete 20 screens you are rewarded with an nice animation of the rocket blasting off and disappearing off the top of the screen. My son Charlie got it after a couple of false starts, so I know it all works.  I was never good enough to successfully complete my own game on a full 20 stages.  After 10 stages a tone will sound and the maze will get a little tougher, with only two exists, instead of 3, for movement between each floor.


Another game is also from Japan. Manbiki Shounen or "Shoplifting boy" is a classic early Japanese BASIC game, which has been described as the first example of a "stealth game."  I had left this game a little unfinished. I needed to work out a better way to hide the bottom of the characters as they passed behind the shelves of the store in which all the action takes place. I needed to do this because unlike the NEC PC the coco and MC-10 don't have an extended character set for the MC-6847 VDG with line graphic characters. To get proper "legs" and "feet" I had to use the regular SG4 graphics, which required two lines to work, instead of one as in the original. I finally got this fixed up and also translated it to Coco Basic.

I also translated my version of "Elevator Action," a classic arcade cabinet game. Mine is a bit of a flicker-fest. The action is frenetic and there are some tricks that need to be mastered to avoid death, but with some persistence you can become the 007 of Coco Basic games. If you complete a number of buildings, you will be rewarded with a special message in honour of CocoFest. But I doubt if there are many with the fortitude to persist against the annoyances inherent to Basic arcade gaming. But if anyone does and can prove that they have done so. I will happily send them a trophy.

Another original game initiated this year was "Alpha Force." This was a development of a failed game called "Square Force."  Square Force was simply too slow. I figured out a better way to have the enemies track the player's character in a simple grid layout.  I took advantage of every possible way to reduce processing in the main loop. Finally, Charlie made some suggestions about adding some additional challenges, so now you must also collect randomly distributed plus signs for 10 points each. Every 100 points will earn you an extra life.  Since the shots move simultaneously as you and enemies move, there are times when your shots will skip hitting an oncoming enemy. There's no way to avoid this without a serious speed penalty, at least that I can figure out, so it is just a deficiency the player will have to work around in his or her play. Sometimes munitions fail, just like in real life!  But at least now you can win extra life back, so you can possibly go on forever.  But the enemies will also slowly get a little more ruthless in tracking you.

The collection is rounded out by my Christmas 2019 mini game "SANTA", which started as a simple animation of Saint Nick flying over house tops. However, it now involves a "reflex" gift dropping challenge. You will receive an assessment of your performance. Only the very best will be awarded the coveted "Super Santa" rating.

Finally, I included my most recent version of my port of Akalabeth from MCX Basic. I found an error while testing the Coco version as I prepared JGGAMES13.DSK. So if you have a version from my prior distribution of this program on JGGAMES12.DSK, replace it with this one.  The newest version of my JGGAMES.ZIP containing JGGAMES13.DSK is where I have now put all my work from 2019.

BASIC 10-Liner Entries

My entries for the BASIC 10-Liner Contest are as follows: SANTA, which is just the same as the Coco game above, but condensed; AINVADER, which is an extremely simple Space Invaders type game using string manipulation to move the invading force; and OUTHOUSE.


Outhouse was inspired by the wonderful artwork of Erico Patricio Monteiro using a SG4 64 by 32 pixel layout:


Erico really knows how to manipulate those chunky pixels into something magical. Alas, in 10 lines it would be impossible to take full advantage of his screen work, but I hope to apply his stuff in a more advanced version of the game. Here is a video of Outhouse:


Saturday 15 February 2020

The Secret of Flagstone Manor


My streak of interest in text adventures continues. The Secret of Flagstone Manor by Brian Betts of Mountain Valley Software is reportedly Australia's first home produced text adventure in 1981. Or so reports Renga in Blue has been playing it recently. This piece of BASIC computing history certainly peaked my interest. It would be nice to add this game to my international collection. A Los Lovag was a fun exercise in translating one of the first Hungarian text adventures. Hopefully an Australian program would not present the same degree of translation issues, although having heard some working class Aussie accents, I had my doubts. But the game text was very well written and presented no translation issues;). This is not surprising as it was not a homebrew effort, but a commercially available game.

The only issues in translation involved the large number of ELSE statements. The game was originally programmed for the TRS-80 Model 1, so using ELSE might have been a memory saving trick. I only have a couple of thousand bytes left in my version after having removed all the ELSEs, so it would have been a tight squeeze in a 16K Model 1. Another memory saving trick was the use of strings to store info about items.

Betts used a system of string arrays for items held and for items in each room. Up to 10 item strings can be "stored/dropped" for each room. I can't recall seeing anything quite like it. Most other parsers use numeric arrays to store which items are being carried and which rooms they are in. This game just moves strings around in a string array for each location with each actual item name. This method makes for a lot of string storage when saving a game, so I had to leave that part out since the MC-10 can't easily save strings.  But it likely saves memory since each item will simply represent a single byte for each character of the item, stored in string space, instead of that plus some complex numeric array structure with 5 bytes for each array item.

Renga in Blue suggested that the game had similarities Scott Adams early games, but I'm pretty sure it's not like the Adventureland parser. The BASIC version of that program is very complex (and slow) and uses lots of numeric arrays, probably because it is meant to be a generalized "engine" for multiple adventures. This one uses a more standard and simple cascade of IF/THENs to parse input for different verbs. It also doesn't read its locations into an array. There are only 18. So it just uses a sequence of IFs to print specific room info. I'd say this game does not have any specific parser "engine" at its core. It just applies some common approaches to programing adventures that had developed from 1979-1981. Except for the string array stuff re. items.

On the whole it is a very well debugged, elegantly written, BASIC text adventure program. Although the room count is small it is a fairly complex game. There is a timer aspect that can result in death, but it is fair. The puzzles make sense and there is a pretty interesting dynamic HELP command. So don't just accept the first response of "LOOK AROUND" from that command. The response eventually does change according to progress and context. The other sources of death are also generally fair, since there are clues to help avoid them. 

It was a fun exercise to port the program and add another international early BASIC text adventure program to my collection. I am currently working on De Tijdmachine, an early Dutch text adventure, which I hope to have up and running shortly, so more international fare is coming.

The source code for my version can be found here: https://github.com/jggames/trs80mc10/tree/master/quicktype/Text%20Adventures/WorkInProgress/Flagstone

SPOILER ALERT -- Walkthrough below.

*** The Secret of Flagstone Manor ***
Walkthrough by Jim Gerrie 2020

GO DOOR
E
LOOK CUPBOARD
GET MATCHES
GET CAN
W
W
LOOK SHELVES
GET BOOK
READ BOOK (LAST # FOR COMBINATION)
DROP BOOK
TURN LAMP
GO OPENING
GET GARLIC,LOOK SKELETON (YOUR FATE IF YOU TAKE TO LONG)
EAT GARLIC
U
E
N
W
LOOK RACK
GET WINE,LOOK BOTTLE
PRESS PANEL
GET KEYS
E
S
GO STAIRCASE
OPEN DOOR
GO DOOR
MOVE BED
GET OPENER
OPEN CAN
DROP CAN
DROP OPENER
GET CHEESE
GO MANHOLE
OPEN CHEST
GET DIARY
READ DIARY (HINT ABOUT EATING GARLIC)
DROP DIARY
MOVE CHEST
GET ROPE
D
LOCK DOOR
GO BED
SLEEP (HEAR CLINKING CHAINS IN NIGHT)
W
OPEN DOOR
GO DOOR
D
N
N,HELP
OPEN CLOCK
GET KNIFE
E
LIGHT FIRE
GO OPENING
MOVE COBWEBS (CLUE ABOUT SECOND # OF COMBINATION)
DROP MATCHES
GET LADDER
S
W
S
S
GO STAIRCASE
GO DOOR
LOCK DOOR
GO BED
SLEEP (DREAM ABOUT LEAVING WINE IN STUDY OVERNIGHT)
W
OPEN DOOR
GO DOOR
D
N
N
OPEN DOOR
GO DOOR
LOOK DESK (IGNORE ASHTRAY)
DROP WINE
S
S
S
GO STAIRCASE
GO DOOR
LOCK DOOR
GO BED
SLEEP (YOU HAVE A QUIET NIGHT)
W
OPEN DOOR
GO DOOR
D
N
HELP
CUT PAINTING
DROP KNIFE
GET PAPER, READ PAPER (CLUE ABOUT FIRST # OF COMBINATION)
DROP PAPER
N
GO DOOR
PRESS PANEL
GO OPENING
FEED MOUSE (CLICK-- THE WALL MOVES ASIDE)
GO OPENING (YOU'LL SEE A GHOSTLY FIGURE, WHO WON'T ATTACK BECAUSE YOU'VE EATEN GARLIC)
OPEN DOOR
3
8
7
GO DOOR (DON'T TAKE GOLD YET)
TIE ROPE
S
PULL ROPE (CRASH-- YOU AVOID THE CAVE IN BY LEAVING THE ROOM)
GO DOOR
GET GOLD
GO HOLE (YOU USE THE LADDER-- YOU'VE ESCAPED WITH THE GOLD! YOU'VE SOLVED IT ALL.)


Sunday 9 February 2020

The Silverton Adventure


The map at the bottom of this post has instructions for all the basic actions that are needed to get to the end of the Silverton House Adventure, which I have ported to Micro Color Basic for the TRS-80 MC-10 from Extended Color Basic for the Coco. This was published by Rainbow Magazine (Falsoft) in 1985 as a type-in game in its Second Rainbow Book of Adventures. The authors are John and Pat Everest. It's a treasure hunt and the basic plot is that you are a master adventurer invited to the first ever Durango puzzlers adventure game.



Durango Dan, has challenged you to find the dollar sign hidden in the Silverton estate. But this is not your standard treasure hunt. There are many (non lethal) traps, red herrings and a large number of diabolical riddles and puzzles to solve. The walkthrough map below provides you with the minimal instructions you need to unlock doors, but it doesn't take you through all the rooms you need to examine in detail to find all the clues to unlocking those doors. Puzzles like this one:

In one room with three keys hanging in a little alcove you can read this message written underneath the keys:

THE KEY IS THREE!
          TINONGTGTATHKHEEELTSEHIAELDGVKOEELRYDKSKEAEYYYSSSAIAYNYKGRI

By skipping every three letters from various starting points and wrapping back to the beginning of the string of characters you can discern the following 3 messages:

          TO TAKE THE GOLD KEY SAY RING
          LEAD KEY SAY SING
          THE SILVER KEY SAY KING

If you "Say" each of these words you are provided with the key.  Simply trying to "get" them opens a trap door which takes you back to the beginning. There are many places where such trap doors are waiting.



Another clue requires that you know that there are four American states with borders that meet forming a perfect cross.





One riddle was particularly hard for me to figure out involving noticing the difference between "pairs of shoes" (8) and simply being asked "how many shoes?" (16).  A keen eye is critical in this game.  Familiar messages are sometimes flashed briefly (with extra words), to trick you into overlooking how many letters are referenced in the message.  Messages are sometimes shown once, and then disappear.  So you must heed the advice on the introductory screen that a "piece of paper might come in handy." Everything must be examined and details noted down carefully, such as:
  • 72 Trophies
  • 23 Dolls
  • 11 Pens
  • 7th son of 7th son (used to decipher a math problem elsewhere referencing "SON X SON")
  • 8 Gowns
  • 8 Shoes
  • 43 Adventures
  • 6 Oranges
You find a painting of a Girl in blue dress sitting on a swing (SWING translated to a phone keypad is 76464, which unlocks a door). What is "below" ZXCVBNM? I take it this is the SPACE key from a standard qwerty keyboard, but I don't yet know what riddle/puzzle this helps with. Durango Dan's "autograph"

VIY MIBLC, ABBY WRALC, TRECES THIN, TROBHOAM LAWL LOVE, DURANGO DAN

can be found in the safe and has 11 words. The following formula gives a combination to the safe:

Left-Dolls, Right-SonXSon, Left-Pens, Right-Shoes = 23, 49, 11, 16

You must take the sum of this combination (99) and divide that by the number of words in the Dan's autograph to give you 9, which is the number of the closet you must open to unlock a door in the room of closets.  Another riddle: "HOW MANY CUBIC FEET OF DIRT IN A HOLE 7 X 14 X 3?"  You might think the answer is 294 square feet, but a  hole doesn't have any dirt in it!  It's a hole!  So the real answer is 0.

There are some puzzles and riddles near the end of the house that I have yet to figure out. Instead I simply resorted to the time tested method of looking at the source code to enable me to figure out what needed to be input. So there is still work for those out there who would like to unravel all the secrets of this enigmatic game.

In porting the game I came across a few errors.  I can't recall all of them, most were minor or stylistic, but one would cause a crash:

1320 IFR=35ANDRIGHT$(B$,4)="DOOR"THENPRINT"THE SOUTH DOOR LOOKS LIKE THIS *"*PRINT"- --- --- *--* * -* *** *- -*--*--*

The *"* in the above should be :":PRINT

Another error involved a confusion between the variables WW, which was used to flag when you find the Dollar Sign by moving a chest, and WX, which was used to flag when you "GET" the Dollar Sign after finding it. The inventory routine checked for WW, which would lead to the the dollar sign appearing immediately in your inventory upon finding it, which might mislead you into thinking that you didn't also need to "GET" it.  But the win routine checked for WX, which was only triggered if you "GET DOLLAR SIGN," so even though you might have it in your inventory you could make to the exit and still be judged to not have completed the adventure.  I fixed this by making the inventory routine use the WX variable.

There was another error with the handling of the container because of conflicts with its use of the variable C and the use of that variable elsewhere in the program, in particular in the entering of lock combinations (A,B,C,D). I changed the variable to C2 where it was clearly intended for handling the player's interactions with the container so that it couldn't be set to values that would cause the malfunction of the container handling routine.

The Game can be played here: https://gamejolt.com/games/jgmc-10games/339292
Select the "Play Game" button at the top and then "Play Our Text Adventures," and then choose SILVERTN from the Cassette menu and type RUN and hit Enter.