The port of the code from the ZX81 went quite well. The two machines share a 32 column screen, which makes things a little easier. ZX81 Basic is a little unique, but not overly weird. The primary difficulty is dealing with the fact that the ZX81 has 24 rows of text, so messages have to be shortened or blank lines removed to fit information into the 16 rows of the MC-10. This was somewhat simple for PM because many of the messages used double spacing, which could simply be removed (or replaced by the use of my handy word wrap routine for printing messages). Other than that, it was just a question of removing redundant code, such as repeated IF statements that do the same test but only one operation per IF. Instead I just use colons. I suspect that the lack of colons in the source indicates that the ZX81 doesn't allow multiple commands per line. To save space I pulled together many such lines into single lines of code containing multiple commands separated by colons. As sometimes happens since I have a "word-processor-eye" view of the code it is easier for me to spot mistakes or minor oddities in the operation of the program that probably eluded the original programmer simply because they were stuck with the clunky line editor and the awkward LIST command. Once again I came to appreciate EmuCompBoy's VMC emulator with its quicktype of text files saved from WordPad. A quick change to the source in Wordpad, then type NEW and Enter and then quicktype in the new source code. Then type RUN and see the results. Takes about 10 seconds.
As I did the conversion it struck me that it might be nice to use some simple VDG graphics for the three panels, then it struck me that instead of just doing that, I could perhaps simply nudge PM into a slightly different story premise based on the Fest motif instead of monsters in a dungeon. As usual, I sat down with my son Charlie and we quickly settled on a "battle with geeks" theme. Instead of "hit points" we would use "geek cred". Instead of "magic" we would use "floppy trading". The items would come from the Coco Fests as would the "monsters" aka "geeks", who would, like in the original, come in a range (1-100) of power when it came to their geek cred. Here are some screen shots of the new game:
Finally I thought it might be nice to add a trivia component to the game, that would celebrate Coco lore and act as another way of judging the "geek cred" of the player. I asked people on the Yahoo forums to send me multiple choice questions and a few did, such as Allen, John Mark Mobley and some others.
Allen Huffman Wrote regarding this aspect of the game:
It is our shared hope that over this coming year we can add a much larger library of questions than the current 40 (please still send me any you think of), which will likely require integrating something like Allen's tokenization routine. Unfortunately, this will likely only be available on the Coco version of the program and not the MC-10.I was actually thinking more about memory usage. I created a simple word tokenizer in C for my day job when I was out of room in a small project, and I think it could be used on the CoCo as well. I wrote a test version in BASIC via Xroar yesterday, and will finish it up and make it available in case it is of interest to you.Basically, it will scan thought all the strings (from a text file, or from data statements) and then create a dictionary of words, and tokenized strings. I have a method that will be ultra efficient, but not human readable (it would be legal BASIC, but not something you could LIST or type in), and another one that is not quite as efficient but completely typeable.For instance, it might look like this:1000 REM Token dictionary1005 DATA 8,bacon,eggs,and,really,like,i,pancakes,tooAbove, that might represent an 8 word dictionary. Then the strings would be encoded and might look like this:2000 REM Tokenized strings2005 DATA "FDEACD"Assume "A" is 0, etc. So that represents those full words. This is a simple example, limited to the number of single characters you could put in a string. If I built those strings mechanically, I could use non-typeable characters and get maybe 128 tokens. But, a decent compromise is to use two characters. Instead of using numbers, which take more BASIC space:2000 DATA 2,42,3,25,5,1,23,51
There are several aspects to game play beyond the trivia component. These are a legacy of PM. The object is to explore and gather the right kind of items that will increase your geek cred. Other kinds of items add to your “floppy” supply. One must learn to recognize the differences between these two kinds of item. The opponents have different levels of geek cred (1-100). If you run into an opponent who has more geek cred than you, they will defeat you. If you have more geek cred than them, then you will defeat them, but you “use up” geek cred to do so (i.e. the amount of geek cred of your opponent is subtracted from your geek cred). So you must sometimes avoid such combat by using floppy trading (at least as long as your “disks” hold out) to overcome more powerful opponents. However, I added the trivia question component as a randomly occurring “save” feature (you only get asked a question half the time when geek combat occurs). If you meet up with someone with higher geek cred and you answer the question correctly, then you beat them no matter how much cred they have, but just barely, so your cred goes to 0. If you meet someone with higher cred, but flub the question, then you lose. But if you meet someone with lower cred and get asked a trivia question, but flub the question, then your geek cred goes to 0. If you battle someone with lower cred, and get the question, you beat them in the usual way (your cred is reduced by the # of their cred).
So, in brief, navigating to the top floor takes a bunch of strategies. You need to collect floppy trading stuff (or equivalents, such as the coco CD or drive-wire cables). You also need to collect other items, which increase geek cred (manuals & cool hardware). You need to avoid combat with people with higher cred unless you feel you have enough floppies for floppy trading to defeat them, or you are confident enough that your trivia knowledge can save you in geek combat no matter what their cred. You also have to try to keep building up cred and floppy supplies, so sometimes careful exploration of rooms (and strategic retreats) can be more prudent than simply trying to move forward and upward via passages stairs and combat. Use the “s” option to see the status of your cred and floppy supplies at any “what direction” prompt. I should also mention the “q” can be used to start the game over.
There are also some completely random elements of the game that can knock you back down a few levels (the object of the game now is to get to floor 20 of the hotel where the "no minimum bid auction" is going on). A geek squad can abduct you, or you can accidentally wander into a elevator. These events add a kind of "snakes and ladders" element to the game.
I will probably post the 40 question MC-10 version soon. I will hopefully be followed next year with a more full-blown trivia Coco version. Whichever version you might try, I hope you enjoy "Fest Quest."