Wednesday 25 December 2013

Friday 13 December 2013

Retrochallenge Winter Warmup Project

Mahjong

Well here are my plans for a Retochallenge Winter Warmup project and my New Year's resolution.  I'm going to finish up the following Basic programming projects I've been working on for the TRS-80 MC-10 and then port them to Coco and Dragon formats:

1. NightBlitz
2. Flipull worldofdragon.org and JGGAMES8.DSK
4. Ouranos worldofdragon.org and JGGAMES6.DSK
5. Great worldofdragon.org and JGGAMES6.DSK
6. Tomb worldofdragon.org and JGGAMES6.DSK
7. Aststorm worldofdragon.org and JGGAMES6.DSK
8. Fesquest worldofdragon.org and JGGAMES5.DSK
10. Defcon1 worldofdragon.org and JGGAMES2.DSK
11. Qbert worldofdragon.org and JGGAMES2.DSK
12. Invader worldofdragon.org and JGGAMES2.DSK
13. Mahjong worldofdragon.org and JGGAMES2.DSK
14. Rover worldofdragon.org and JGGAMES2.DSK

I'll also be adding a number classic Basic games to my Coco and Dragon software collections that I originally ported to the MC-10 from other systems:

Hustle (TRS-80 Model 1/3) worldofdragon.org and JGGAMES8.DSK
MoonFX (PC) worldofdragon.org and JGGAMES6.DSK
3DLaby (VZ-200) worldofdragon.org and JGGAMES9.DSK
Mountain (Spectrum) worldofdragon.org and JGGAMES7.DSK
Elgon (TRS-80 TRS-80 Model 1/3) worldofdragon.org and JGGAMES7.DSK
UncleTay's House Adventure (Apple JSBasic github.com) worldofdragon.org and JGGAMES9.DSK
Mansion (TRS-80 Model 1/3) worldofdragon.org and JGGAMES7.DSK
DND (TRS-80 Model 1/3) worldofdragon.org and JGGAMES7.DSK
IceWar (TRS-80 Model 1/3) worldofdragon.org and JGGAMES7.DSK
Swarms (PDP-11) worldofdragon.org and JGGAMES9.DSK
Roulette (Sol-20) worldofdragon.org and JGGAMES6.DSK
Nukewar (TRS-80,Apple,Atari) worldofdragon.org and JGGAMES6.DSK
Lostgold (TRS-80 Model 1/3,PC) worldofdragon.org and JGGAMES7.DSK
Snake (Nec PC8201a) worldofdragon.org and JGGAMES9.DSK
Uboat (PC) worldofdragon.org and JGGAMES9.DSK
CIA (TRS-80 Model 1/3) worldofdragon.org and JGGAMES7.DSK
Gables (TRS-80 Model 1/3) worldofdragon.org and JGGAMES9.DSK
Bulls (TRS-80 Model 1/3) worldofdragon.org and JGGAMES8.DSK
Draughts (Alice) worldofdragon.org and JGGAMES8.DSK
Tholian (TRS-80 Model 1/3) worldofdragon.org and JGGAMES7.DSK
Dominoes (TRS-80) worldofdragon.org and JGGAMES6.DSK
Andromed (PC) worldofdragon.org and JGGAMES5.DSK
Switch (Atari ST) worldofdragon.org and JGGAMES5.DSK
Engineer (TRS-80 Model 1/3) archive.worldofdragon.org and JGGAMES5.DSK

Monday 13 May 2013

"Fest Quest:" Pit With Monsters By Jim Ennes Becomes Something New

Allen Huffman, the videographer and Fest reporter for Glenside Color Computer Club's Annual Last Coco Fest contacted me after the "last" Chicago Coco Fest to see if I might be interested in programming a game based on a Fest motif.  He had seen my port of Pitman and thought that I might be able to create a similar puzzle/adventure game, but somehow using Fest locations  He thought it could possibly be used as fundraiser for Glenside or perhaps to help promote next year's event.  I started thinking about the project, but in the meantime I had been working on another port of a classic game from the ZX81 called "Pit with Monsters" or PM for short.  In this game you are presented with three panels representing left, forward and right, each containing a brief description of a what you see in those directions (see above).  You choose which direction to go based on what you see there and each of the various kinds of structures (passageway, room, door, stairs up, stairs down) has different attributes that influence their optimal navigation (up and out of the pit).  Also you run into a range of monsters (1-100) with varying strengths that you must take account of when you choose to fight them.  You can fight monsters using your strength and weapons, which are all represented by your "hit points," or with magic using your "magic points."  You can find various items throughout the pit that can add to your supply of these different kinds of points.  You can also choose to retreat, but this option has its own dangers.  It is a very simple game in its elements, but they all combine to create a game that is actually quite complex and interesting to play.

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:
I based the various geeks on names mentioned in Glenside newsletters over the years (more mentions roughy higher in the list) and some classic names from Color Computer magazines for the most powerful geeks.

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:
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 dictionary
1005 DATA 8,bacon,eggs,and,really,like,i,pancakes,too

Above, that might represent an 8 word dictionary. Then the strings would be encoded and might look like this:

2000 REM Tokenized strings
2005 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
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.

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."

Tuesday 30 April 2013

Retrospectiva Win!


Pablo Roldan of the Retrospectiva Contest has e-mailed and informed me that Penguino has won.  I would like to thank all the people on the various forums (Yahoo, Dragon, Alice) who helped out either by voting, or programming advice over the years.  I'm already looking forward to next year's contest, where I hope to submit my WeatherWar and NightBlitz programs that I have sketched out and started working on (a little).  If anyone out there has any other suggestions for classic 8-bit Basic games they think could possibly be done on the MC-10 (or Coco or Dragon) please let me know.

Wednesday 17 April 2013

Time to Vote for the Retrospectiva Contest

Okay. It's time to vote in the Retrospectiva Basic Games contest. Please consider sending your support to my entries in the contest: Penguino, Romp in the Garden, Crawl, Doctor's Adventure on Scaro, and Battlbots. The link to the voting site is:
http://rsp.retrocomputacion.com/retrospectiva-2012-voting-phase-basic-games/
Thanks to all those who helped along the way.

Sunday 14 April 2013

The House of Seven Gables Port

Well I've ported yet another of Greg Hassett's classic text adventure programs from TRS-80 Model 1 Basic to the MC-10.  As usual this required sifting out all the ELSE commands and replacing them with calls to subroutines to process the different branches of the IF/THEN/ELSE.

It also required shortening some lines.  I find the best way to process such long lines is to make my Wordpad Window a size that I know when I have roughly passed the 128 character limit.  Then I just make jumps to subroutines (because Hassett had programmed with very tight line numbering I couldn't simply add lines).

Another quirk of TRS-80 Model 1 Basic is the ability to drop the "THEN" command from IF statements.  Hassett did this quite a lot in this program.  I had to systematically go through and put THENs on all the IF statements.

Finally, I had to switch all the PRINT commands with messages longer than 32 characters to put their message into an M$ variable and then GOSUB my word wrap routine (lines 1-4).  If such messages contain numeric variables, these variables have to be put into a STR$() command and these have to be concatenated with the M$ string using a "+" symbols rather than the  ";" symbol normally used in PRINT commands.

I also had to convert the tape cassette save and load routines.  For the MC-10 the only way to save and load to tape is to use the CSAVE* and CLOAD* commands which can only save and load the contents of a numeric array.  So you need to expand one of the arrays (usually the largest one being saved) to accept any other single variables that are also being saved.  In this case the OB array is the bulk of the saved file data, so I simply expanded its size by 6 elements to contain the 6 extra unique variable elements.  The result is that the original load routine which looks like this:

74 CLS:INPUT"PRESS <ENTER> WHEN CASSETTE PREPARATIONS ARE MADE ";XX$
75 FORI=8TOLO:IFOB$(I)=""THEN77
76 INPUT#-1,OB(I,0)
77 NEXTI
78 INPUT#-1,CP,FF,ZZ,T,P(5,0),DF

must be converted for the MC-10 to look like this:

74 CLS:INPUT"PRESS <ENTER> WHEN CASSETTE     IS READY FOR LOADING";XX$
75 CLOAD*OB,"GABLEDAT"
76 CP=OB(41,0):FF=OB(42,0):ZZ=OB(43,0):T=OB(44,0):P(5,0)=OB(45,0):DF=OB(46,0)

For doing saves you simply reverse the process, so for example ZZ=OB(44,0) becomes OB(44,0)=ZZ, which you do for all the single variables before issuing the CSAVE*OB command.

There were also a number of places where Hassett used FOR/NEXT loops with IF statements that would break out of the loops without completing them.  I don't know if this can cause any real problems, but it strikes me as inelegant. I always take something like this:

10 FOR C=1 TO 10:IF P(C)=5 THEN F=C:GOTO100
20 NEXT
30 ...

And  change it to something like this to make sure FOR/NEXTs are always completed:

10 FOR C=1 TO 10:IF P(C)=5 THEN F=C:C=10:NEXT:GOTO100
20 NEXT
30 ...

If anyone can tell me if such finickyness on my part is pointless I would appreciate hearing from you.
Anyway, as usual all my programs can be found in the Emulator .c10 format at: https://github.com/jggames

Wednesday 27 March 2013

Scrabble Helper Final Version (Hopefully)


I've released the final version of Scrabble Helper for MC-10, Coco and Dragon.  It can be found on the Yahoo MC-10 group site, the Yahoo Coco site, the Dragon Archive Forums and my own site.  I think I've got rid of most bugs and added all the features I can add, given memory restrictions.  Recent additions include adding a bunch of 2 letter "killer" Scrabble words.  Now the word look-up function ("H") does not just provide a list of the first five words found, but continues rolling over the list of five until you hit a key or until it reaches the end.  If it reaches the end of its dictionary, it then prints a list of the five longest words found.  I got rid of a few lingering proper nouns from the dictionary and cleaned up the display when the game ends.  I also added a total point calculation so that games between multiple players can be assessed in terms of the overall level of competition.  You can also now choose to play as a single player for playing games of "Scrabble Solitaire."  I should mention that the key in the bottom right lists the letters not only in order of ascending point values, but descending order of the number of tiles.  In other words, "E" comes first because the largest number of tiles are "E"s followed by "A"s and then "I"s, etc.

Friday 22 March 2013

Scrabble Helper Beta


I have a working version of a Scrabble game/simulation for the TRS-80 MC-10.  It's not single player, but with the [H]elp function you can have the computer search for up to 5 word suggestions.  It searches the tiles (or those in front of the left arrow, which is what I call the "terminator" symbol).  It can only search real letters and not "blank tiles."  Its dictionary is about 1750 words long, and includes some of the killer Scrabble words like "aa" (which is a form of scoriaceous lava).  Hitting any key cancels the search.

There are two modes for using the game.  If you enter [Y] to the prompt about "using a real game" you can input the tiles you wish to play.  If you have any blank tiles you will have to bury these between other letters and then re-arrange the tiles to get at the blank tile.  For some reason the INPUT command in basic doesn't take single blank spaces as input.  I have too little time and inclination to do away with this limitation.  If you make a mistake, just have the next player hit [F] to forfeit her turn, and then re-input your tiles.

The other mode is regular play.  You are given 7 tiles from a virtual bag.  When you play tiles, your compliment is restored to 7 from the virtual bag, until the bag is empty.  Once the bag is empty, up-arrow characters are used to fill out your shelf.  These up-arrow tiles cannot be played, so keep them behind the terminator symbol.  The game is completed after six [F]orfeit commands are issued by either or both players after the bag has been emptied.  So, once you both can't make any more words, or someone has played all her last tiles, just keep hitting [F] until the final score card comes up, or hit [*] key to end immediately.  The score card represents the scores of each player after subtracting any tiles remaining on the players' shelves.

Another command is [E]xchange, which will swap any of your letters before the terminator symbol for ones in the virtual bag.  This option only works if there are at least 7 tiles left in the bag.  The number of tiles left in the bag are listed in the bottom right corner of the screen in the score "key" description space, just above the double letter score DLS information.  The key also contains information on the values of the letter tiles and the other bonuses (triple word score TWS, double word score DWS, triple letter score TLS).


Manipulating the 7 tiles and terminator symbol on your virtual "shelf" of tiles is accomplished by using the [A] and [S] keys to move a cursor left and right through the tiles.  It wraps when it reaches either end of the shelf.  You can move any letter under the cursor left or right by using the [,] and [.] keys.  These also wrap at each end.  When you have a "word" you wish to place on the board (the letters in front of the terminator symbol on you shelf) just hit [ENTER] and your cursor will switch to the game board.  Move your cursor to where you wish to begin the word and hit either [D] or [R] to place the tiles down or to the right.  If there are any existing tiles on the board these will be jumped over until your entire word is placed.  If there is not enough space on the board, or if your word is not touching any existing words, or you start on top of an existing tile, then your word will not be placed.  If your word can be placed, your potential score will be displayed along with a prompt "OK?".  Press [Y] to place your word and take your score or [N] to return to the board.  If you hit [ENTER] while on the board, you will be taken back to the shelf.

If at any point you wish to complete the game and have the final scores computed, just hit the [*] key.  See my previous postings for information about the scoring algorithm.  As far as I can see from testing and playing few games with my son, it seems to work.  Please let me know, though, if you find anything fishy, or would like added features.  The beta is called "SCRABBLE13.TXT" and it can be found at the Yahoo MC-10 site:
http://tech.groups.yahoo.com/group/TRS80MC10Club/

Sunday 17 March 2013

Scrabble Update


Well, I have a somewhat working scoring system in place.  At least I think so.  If any expert Scrabble players out there, for instance, could tell me whether the arrangement of tiles above should work out to a score of 47, it would be much appreciated.

I also have a functioning "tile re-arranging" routine that allows you to move tiles easily and to select the word by moving the terminator character (the left pointing arrow in the above).

What remains to do is to add the multiple player stuff (up to 4) and to design the right hand side of the screen.  I would like to add a little "key" for the different values of the letters and one for the meaning of the colours (i.e. DWS, TWS, DLS, TLS).  I also will add the ability to choose between using the program simply to keep score for a real game and actually playing the game just on the computer.  In the former, you will input your tiles each turn, whereas for the latter, the computer will provide you with tiles for each turn till the virtual bag of 100 is empty.  Which reminds me, I still have to add provision for 2 blank tiles...

I'm taking this project a littler easier than I have of late.  I had quite a rush there for a while getting projects squared away for the Restospectiva and the CocoCoding contests.  Now I'm back to simply programming for the fun of coding.  My wife finds games like Scrabble, Sudoku, and Mahjong relaxing.  I finding making computer versions of such games relaxing.  But playing... not so much.  So if there is anyone out there willing to do a little beta testing like my son Charlie, please let me know what you think of my games.  Critical comments or bug reports are much appreciated.

Monday 11 March 2013

Yet Another Project Underway: Scrabble



Well I've got another project underway.  I'm trying to make a 4 player Scrabble game.  I already have a 1750 word dictionary built in, and an algorithm for finding words in it from a jumble of 7 letters.  I had originally had aspirations of creating an AI to play against.  But after loading the dictionary, there was only about 6200 bytes left.  Also, the word finding algorithm takes about 20 minutes to search the entire list for words that can be created from 7 random tiles.

So I have settled for trying to make a simulation of the board, which will automatically score words placed on it, and keep track of tiles from a virtual "bag" of 100 tiles for up to four players.  The dictionary will be used only as a "Help" feature if requested, and will search for word recommendations until a key is pressed to cancel the search.  Perhaps this can function as a simple "AI."  A single player could choose 2 player mode, and then use the help function to get some recommendations of words for the "second" player, which could then be placed by the first player to create a "pseudo opponent."

Or I might just make a routine that allows players to key in words directly for placement on the board for scoring.  This way you could use the program in conjunction with a real game, but just as a "score keeper."  Or perhaps both options.

I've basically got the algorithm in hand:
1. Input letters for your word (or manipulate 7 tiles on screen until in desired order, use left arrow ASCII char 95 as terminator of desired word)
2. Move cursor on board to beginning position for word
3. Prompt whether Right or Down direction desired
4. If down, then count down for each letter in the letter list compiling a list of @ locations and also counting colour bonuses and letter scores.  Skip over any existing letters on the board, but count them for scoring purposes.  At the end of this process, check for any letters in front of the first letter position or after the last position.
5. Process each @ location for possible horizontal words. If one is found, count letters (including @ location letter and any colour bonuses for that location)
6. Place actual tiles on the board (reverse video) and report score
7. Confirm placement
8. Undo if not confirmed

A similar process will be needed for right direction, which if I do it right, can perhaps simply use the same code as above, just with different vectors.  In fact, I'm sure I'll have to have a single routine, because otherwise I'll probably run out of space!  20K of memory is not a lot to work with, but its an interesting challenge.  We'll see if it can be done.

Saturday 2 March 2013

TRS-80 Model 1 Homage and "Commercial Software" for the MC-10


Another useful source of code to port to the MC-10 can be found in the world of the mother of all TRS-80s, the Model One.  The 128X48 set/reset graphics of that machine can often simply be converted to the MC-10s 64X32 set graphics by multiplying any X coordinates by .5 and any Y coordinates by .66 to adjust to the MC-10's smaller screen size.  So a game like Softside magazine's famous "Engineer" simulation by David Bohlke (thanks to Neil Morrison on Yahoo for bringing it to my attention), which looks like this
when converted to the MC-10's screen looks like this:
 Of course since the MC-10 has colour, we can also have variations on the theme such as this:
Another thing that will have to be adjusted is the print@ locations, but this is often as simple as multiplying the number by .5 since the MC-10 512 long text screen is exactly half of the TRS-80's 1024.  This often requires that text messages be shortened, which is somewhat of an art form, but I have generally found that messages can usually be adequately expressed in a more terse "MC-10" fashion without much, if any, loss of information.  Sometimes creative use of reverse video can also help.

I have found that even with the added overhead of adjusting X and Y coordinates on the fly, the MC-10 versions of TRS-80 programs are often faster than the originals.  This is especially the case if some of my speedup techniques are added.  This can sometimes make lack-luster games into truly challenging arcade action games.  The following are some of the other programs from the TRS-80 world that I have ported to the MC-10:

ABM Command Quest 1 Maze Race
Santa Paravia and Fiumaccio Rescue Adventure in the Near Tholian Sector

All the above programs "Rescue" "ABM Command," "Quest 1," "Maze Search," "Santa Paravia and Fiumaccio," and "Adventure in the Near Tholian Sector" where first published in the groundbreaking Softside magazine.  I have also found 80Micro to be a useful resource.  To gain access to the original code, I started by simply typing in the programs from PDFs of these magazines that I was able to find on the Net (thanks to the scanning efforts of many dedicated 8-bit enthusiasts).  I moved on to using character recognition software to take away some of the brute work of typing.  Finally, I was able to find emulators for the Model One, which contained utilities for converting programs from emulator files into simple text files.  Such files could than be edited and loaded directly into EmuCompboy's MC-10 emulator using it's wonderful "quicktype" feature.

Plowing through all the Softside and other magazines you can find on-line would have been a terribly arduous process (although perhaps a wonderfully nostalgiac one).  However, I was able to avoid much of this work because of the help of a very valuable resource on the Net called the Giant List of Classic Game programmers by James Hague.  It can be found at: http://www.dadgum.com/giantlist/
As he describes his list:
This is a Who's Who of classic game designers and programmers, where "classic" generally refers to pre-NES 8-bit home computers (like the Atari 800 and Apple II), consoles (like the Atari 2600 and Intellivision), and arcade coin-ops. Why the pre-NES distinction? Because prior to that there was a closer connection between the creator of a game and the finished project. That's an oversimplification, because there were 8-bit computer games developed by teams, but single-person, single-vision games became rarer once the Nintendo-era of consoles took off.
This is great resource because it not only lists the programmers, but also their programs, which system they were programmed on, and whether they were "type-in" Basic programs.  Using the Giant List I was able to quickly zero in on some of the big favorites of the 8-bit era and find TRS-80 versions.  Programs that had versions created for the other 8-bit machines tended to be the best programs for conversion because, if they had been ported multiple times already, this was usually a good indication that the program was amenable to conversion.  Sometimes I have even found "commercial" Basic programs in this way.  For example my port of "Andromeda Conquest" by Avalon Hill was a result of noticing that it was a Basic program that had versions for TRS-80, Atari, IBM, Apple and Commodore.


Andromeda Conquest TRS-80 Gameplay screen
IBM TRS-80
Atari Version MC-10 Version
However, in this instance I worked from the IBM source because it was available on-line in GWBasic format, which allowed me to easily save the program to an ASCII text file (Save "FILENAME",A just like in Coco basic) for importing into the MC-10 emulator. It also lacked some of the complexities and fancy screen formatting that had been added to the TRS-80 port of the program.  For example, the IBM version used simple number entries for all display objects instead of letters and numbers.  Still, conversion was difficult because a 32X16 screen is a real squeeze compared to the 40X24 screens of these other systems.  Also, recreating a simple "reverse video" subroutine presented some difficulties.  In the port, I had to swap the panels that displayed the Fleet Status and the list of fleets, since the MC-10 left only 11 characters to the right of the main map.  In the end, I was able to get all the same info of the original shoe-horned into the screen with only a little loss (witness the concatenated menu options in the MC-10 version above).  Still, the MC-10 (and the Coco and the Dragon) now have a classic 8-bit program shared by the other classic systems that has all the same game play and features of the original "commercial" program.  You can even go here to get a PDF of the original manual http://www.scribd.com/doc/93433653/Andromeda-Conquest

So, who says new "commercial software" is no longer coming out for computers like the MC-10 and Coco.  You just have to know where to look!

Thursday 28 February 2013

ZX81 Homage and Pipe Frenzy Update

My son Charlie also suggested that I find a way to add a little more challenge and variety to Pipe Frenzy. I have responded by adding a special randomly placed "gold pipe" which you get extra points for if you can integrate it into your pipe network.  When the water reaches this section of pipe it makes a satisfying gurgling sound, and slows the water's progress somewhat--giving you a little extra time to plan.
One question Charlie asked me was why I like to make programs that already exist for the Coco (we have one he sometimes plays games on for a "classic 8-bit" experience of the "olden days" of computers).  My reasons are twofold.  First I simply like to program, and some the classic games provide simple compelling concepts that are easily programmed on a 8-bit computer.  Second, the MC-10 is the machine of my heart, since it was my first computer, and as I tell him, it didn't have then, and still doesn't have now, all the programs (nice machine language game programs) that the Colour Computer has.  I'm trying to fill some of the gaps with the best Basic equivalents that I can make.  I get my inspiration from looking at all the great 8-bit era computers to see if I can find simple game ideas that can be recreated using the special Basic techniques I have developed and learned about over the last few years.  One example is the inspiration I received from a game I found on a ZX81 emulator, which is a variation of the classic arcade game "Scramble."  Here's the ZX81 program:
I have generally found that if a program can be made in machine language or Basic using only the ZX81's simple graphics, a version can probably be created for the MC-10 using only Basic.  Here's my variation on Scramble:

Other ZX81 games that I have found inspiration from for creating MC-10 basic games can be found on the Steven's ZX81 classic basic programming website: http://zx81.reids4fun.com/?action=zx81.  His Basic programs, for example, inspired my versions of Joust and Tower Dodge:

Tower Dodge

I really think what my MC-10 retro-computing programming hobby re-creates for me is some of the magic experienced by the people, like Steven, who were first introduced to home-computing on  machines like the ZX-81 that required the user to learn a bit of programming.  I have tried to pass some of this interest on to my son Charlie, and he seems to have taken it up.  He has developed quite an interest in C, Java and Python programming, which he experiments with using his laptap, which he has "purified" of Microsoft products (This is something we agree to disagree about, as I quite like Bill's version of Basic).  Instead, his laptop has multiple partitions containing multiple versions of Linux and GCC etc.  Way to go Charlie, you are truly a "Master of the Bash!"  And you've definitely helped inspire my ongoing interest in classic 8-bit Basic game programming.


Attack of the A-Holes

Well I've been trying to make my game "Tunnel Jumper" more challenging.  As usual my son Charlie was very helpful through his role as chief "Beta Tester."  He was able to master the game very quickly, and win through to the end.  In fact, it only took him about 15 minutes to figure out all the nuances of the first version of Jumper and then another five to get to level 10.  Based on his experience, he gave me a long list of "improvements."  Here they are:

1. Make the "A-holes" (as he dubbed the alien "A"s) more deadly
2. Make the A-holes "protect" the rare elements 
3. Make the dirt or rock layers less available or thinner
4. Add deadly "lava" to make for more dangers on the screen
5. Add levels of difficulty
6. Add better music and sound
7. Make the levels harder as you progress upwards
8. Have music at the end when you win

I think I have been able to deal with all of these requests.  I've tightened the code and reordered the declaration of variables to increase the speed of the program.  I changed all the prints@s to pokes for the aliens and the player.  This has allowed me the speed to add another alien.  Now you can choose between levels of difficulty.  On level 1 there are 5 aliens, on level 2 there are 6, and on level 3 there are 7 for each screen.  You also can no longer run straight into aliens without dying, although you can still jump on top of them without dying (this can be useful for jumping up to platforms that are usually out of reach).

I didn't add deadly lava, but now I randomly sprinkle red blocks throughout the levels.  These blocks can only be destroyed by a direct hit from your upward digger, so this adds further complexity to choosing where to shoot in order to create workable "stairs."  More red blocks are added on higher levels of difficulty.  Now the amount of blue rock that is laid down is diminished the higher number of screens you complete.  And this is amplified on the higher levels of difficulty.  This means that on higher levels, it is more likely for screens to be created with gaps that can only be bridged by use of spike gun ladders and selective drilling.  So now there is a real need to collect and save these objects for possible use on later screens (Charlie found it easy to complete the earlier version without having to use these special tools).


Charlie used his musical skills to transcribe a snippet of the "Fanfare for the Common Man" into sound statements for the victory sequence.  It only plays if you collect the secret plans, which now appear less frequently (only on level 3 and level 7).  These plans are now displayed as "@" symbols.  I also shortened the timer for each screen before the aliens "gas you," which forces you back a level.  The time limit also varies according to difficulty level.  The higher the difficulty level, the shorter the time delay before you are pushed back.  This really forces the player to move quickly to try to make it to the top of each screen before time runs out.  To create the music, Charlie used the musical score program that I modified from one created by William Barden Jr.  My version allows editing, saving, playback and conversion to sound statements for output to a text file options, to name a few of the additions.  It allows Charlie to compose using a regular range of notes and then to output his work as a string of SOUND commands that I can use in my programs.


I was also able to fix a number of infrequently occurring, but none-the-less annoying bugs. For example in the screenshot to the left you can see the "X" character has been able to drop into the score area of the screen (Thanks Charlie!).  That no longer can happen.  Scoring has been modified so that it is adjusted relative to the level of difficulty.  Rare elements (except for 4 per level) appear under where aliens spawn.

I hope you enjoy the new version for the MC-10 which is available on the Yahoo site.  I hope to have  the code converted to Coco shortly for submission to the Cococoding contest.

Monday 18 February 2013

New Game Tunnel Jumper



I've made a new platform game for the MC-10 and Coco called Tunnel Jumper.  I'd always wanted to make a platform game, but using VDG low-res graphics characters seemed likely to leave too little room for any really significant action or complex maps.  I was able to address this issue by reverting to old ASCII text graphics.  The "X" is your a character.  It is animated by rotating between the X and Y character, which gives a slight illusion of a man walking.  I've used this character in other games such as "Romp in the Garden."  The character can fire upwards (he has taken some kind of vertical drill from his captors), which destroys three character wide sections of the roof.  This allows the character, using carefully placed shots to carve "stairs", which will aid him/her in ascending through the mine to reach the top.  You can see some examples of such stairs in the following image.

The character can also jump by pressing the up arrow.  The jump is in the last direction of movement, or by pressing the "," or "." keys one can turn, without moving, to face a specific direction to jump next.  The character can scale up to two levels, if positioned correctly.  Sometimes parts of the ceiling will have to be blasted to make room for the arc of a desired jump.  Careful planning is required to carve stairs.  If one blasts incorrectly, it is possible to remove parts of the ceiling that are necessary for carving a path to the top of the level.   Since the levels are randomly generated, it is also possible that some will not provide enough ceiling material to carve stairs to the top.  To mitigate such possibilities you are also armed with a "spike ladder gun" which can create a four character high ladder to aid you in your climb and some drills for selectively removing sections of floor.  Pressing "G" fires the ladder gun straight up 4 characters high.  Pressing "D" drills down one character.  Don't drill too much or you can drill yourself into a hole too deep to jump out of.  You can also resign from a level by pressing "R", which will bump you back a level.  A number of additional drills and ladder guns are sprinkled throughout the mine.

There is a time limit for completing each of the 9 levels, so don't dawdle.  On levels 4-5 you can find copies of the alien's secret plans for destroying the human race.  If you can collect these, you will get a big point bonus.  If you complete all 9 levels of the mine, you also get a bonus.  If you escape and have collected one of the copies of the plans, you save the earth.  If you escape but do not get one of the copies of the plans, you merely save yourself.  Here's the final screen (i.e. level 10):

The game can be found on the Yahoo groups for the MC-10 and the Coco and on my personal web-page.  Any comments are much appreciated.
TRS80 MC10 Club
ColorComputer Group