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:  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

Friday, 8 February 2013

New Coco Coding Project "Night Blitz"

Okay.  I'm thinking about doing another Coco Coding contest entry.  As usual I'll start by coding it on the MC-10 and then make the conversion to the Coco if it seems worthwhile.  The idea I have is a for a looping plane shoot-em-up, which I'm tentatively calling "Night Blitz."  You will fly a blue plane which can loop and shoot in any of the 8 directions:
The title page will display a UK roundel.  The scenario I am thinking of is the night blitz on London.  The red planes (2-4 of them) will move back and forth across the screen bombing the cyan city buildings at the bottom of the screen.  You, in the blue plane, will have to pursue and shoot down the red planes while avoiding sporadic anti-aircraft explosings (white) and collisions.  You'll score points for each plane shot down.  Here's a sketch of the title screen:
I recently made some changes to one of my older games "Rainbow Asteroids" to try to make it a wee bit faster. I changed the order of the declarations of the variables to put the most frequently called variable names at the front of the list. It should be a bit faster now and a little bit more challenging.  Please take a look at RROID3.TXT in the G-Soft software folder on the Yahoo group:

You can join the MC-10 group on Yahoo at: