Don't know what's going on there. In any case, the game mechanic involves a continuously changing maze. The logic of the mechanic of the change is difficult to discern, but I thought I might be able to recreate it, at least to some extent, on the MC-10:
8-Bit BASIC Retro-programming Projects and Classic BASIC Games
Sunday, 29 October 2017
RetroChallenge 2017/10: Gotcha
Okay, I didn't think I would have time for anything else for this month's RetroChallenge, but there was lots of curling going on this weekend, which my wife follows with a passion, so I found myself idly coding away while listening to the Masters (the TV's in our den). What I came up with was a program inspired by a real old game. I'm all the way back into the 1970s now scraping the bottom of the barrel for ideas. The game is called Gotcha. It's one of Atari's first video games. Apparently it wasn't all that popular. The original was two player. Each player took turns chasing the other. This theme is reflected in its somewhat risque promotional material:
Don't know what's going on there. In any case, the game mechanic involves a continuously changing maze. The logic of the mechanic of the change is difficult to discern, but I thought I might be able to recreate it, at least to some extent, on the MC-10:
Apparently the original game cabinet used some "breast" shaped cups as controllers. After complaints Atari changed them to standard joysticks. Seems like a pretty blatant attempt at using sex to market a game to teenage boys, but it wasn't enough to overcome the mediocrity of the game. It was no Pong. Here's another video of the original, but just the game play:
I changed the game to be single player. You move your cursor to collect coloured dots randomly placed on playing field. You have to avoid running into walls, or, because the walls are continuously redrawn, having the walls run into you. There is a time limit, so you have to try to move fast. Dots will move if you don't get them in time.They can also sometimes become enclosed by the walls of the changing maze. Here is a video of what I managed to come up with. I have tweaked it a little since making this video. Now the changing walls can't erase the target dots. I also have tried a technique of using a period to replace zero numeric constant in the draw statements, which I recall someone saying can make MS Basic run a little faster. Not sure if it is true, but it doesn't seem any slower either.
So that definitely wraps it up for me for this Autumn' RetroChallenge. Thanks to John again for organizing and to all the other participants for sharing their retrocomputing hobby. I look forward to seeing what you folks get up to next year.
Don't know what's going on there. In any case, the game mechanic involves a continuously changing maze. The logic of the mechanic of the change is difficult to discern, but I thought I might be able to recreate it, at least to some extent, on the MC-10:
Sunday, 22 October 2017
RetroChallenge 2017/10: Dante's Run
This is a weird one. The inspiration for this new game came from a game for the Sinclair ZX81. I was watching a playthrough by Villordsutch of a game called TAI. It is a Star Wars themed game. You start by flying a ship through a tunnel in an asteroid. Except this tunnel is not filled with strange space creatures who might inhabit the insides a giant space worm living in the heart of an asteroid. No, there is a giant skull with stacks of smaller skulls piled on top of it like some kind of Indiana Jones lost temple. And that's not all. The temple is protected by "ghost guards." My first impression was that the game was creepy-temple-themed, but when you get through the cavern you switch to another screen in which you are the Millennium Falcon. A Tai fighter maneuvers around you and you must shoot it out of the sky/space. The mixture of motifs is very weird.
The creepy cavern of the skulls was certainly inspiring. I thought I could achieve the effect of flying upward through a maze using a string array and then just adjusting the pointer variable so you see a window of the current 15 lines on screen. This way the ship could fly up "towards" the top of the screen instead of the more standard scrolling effect used in basic games that takes advantage of the automatic screen scroll that occurs when you print a line at the bottom of the screen. It turned out pretty well and is relatively speedy. Now I have completed a Basic game that scrolls up to go along with my games that scroll right, such as Raider, and scroll down, such as my game Boarder (I'm not sure if I'm using the terms up/down left/right correctly--does the window scroll or the information being viewed by it?--I'll let you figure it out).
I thought I would try to create an even more creepy cavern effect. It's nearly Halloween, so I thought skulls and stuff would be neat. I decided as well to do it in the SG6 mode. This means the walls could be made out of the creepy neon mucus green solid character. The ship uses two other characters from the mostly useless lower 128 character set, which are really just random line patterns that represent bit numbers because no external character generator is wired to the MC6847 on the MC10. I chose a block character with two lines on each side for the base of the ship, and a narrow centred line for the "point" of the ship's nose. The nose part is resilient (i.e. collision detection is only on the base section).
As the game progressed I realized it was really a descent into hell theme I was developing with the extra graphics I was adding. I also needed a "goal" stage to replace the Tai fighter-Millennium Falcon stage in the Sinclair game. I decided to name the game "Dante's Run" and to make the transition stage a showdown with Beelzebub himself. I have been thinking for while I wanted to do a game where you have to shoot through counter rotating shields in order to try to hit the mother ship. This is that motif, but with the Dark Lord as target. You have a limited time to break through the two fire shields and score a hit on Satan. If you run out of time before you do, you start back in the cavern. If you succeed, you score 2000 extra points and you get an extra life. Your life is measured by the length of your laser when you shoot. You start with 5 lives. You lose a life when you hit one of the dark green guardian specters. You die automatically if you hit any walls. Your goal in the cavern is to collect the blue "purgatorial souls." You get 100 points for each one. When you collect 1000 points you trigger the intermediate stage with Satan. Shooting the specters can help get them out of your way, but it doesn't score you any points. Just be careful not to shoot any of the purgatorial souls. Doing so wont lose you any points,but it might upset the big guy upstairs! Here's a vid:
I don't know if I'll have any time to do more stuff for RetroChallenge this month. It's mid-term time for me and the term will be heating up a bit for a while. If I don't get the chance, I wish all my fellow contestants good luck as we head into the final stretch!
Tuesday, 17 October 2017
RetroChallenge 2017/10: Binary Room
Binary Land is a puzzle video game developed by Hudson Soft in 1983 for the MSX, FM-7 and NEC PC-6001. In the game players have to unite two characters (male and female), who are in love. The MSX version features a human boy and a human girl. The player controls the two characters simultaneously, with a timer adding to the difficulty. These characters move in mirror images of each other. The game features many different puzzles stages that the characters must navigate, and there are enemies within the mazes that add extra challenges.
I found out about this game when I stumbled across a Japanese website dedicated to people's computing projects using arduinos and raspberry pie devices. Some of these devices implement versions of Basic to allow for simple programming projects in the style of old 8-bit computers.
This one seemed to display a simple text like game. The author explained that they had created a puzzle game inspired by the game Binary Land. He called his game Binary Room. I suspect this was because it involved a simple rectangle with some randomly placed blocks in it, rather than complex set puzzles/mazes. The movement system was the same though, with two "characters" A and B being maneuvered in a mirror like fashion. The object of the game was to move them so that they straddle numbers in sequence. Each stage has a set of numbers equal to the stage number randomly placed in the room, up to stage 9. Here's the source code for the game as listed by Taisuke Fukuno, who I take to be the programmer, although he might just be the person responsible for the "Create Everyday" website.
I found that the logic for placing the numbers was completely random, so sometimes they could be placed in a way, depending on where other numbers and blocks were placed, that there was not room on either side or above and below, to maneuver the characters around it to straddle it. This would make a stage impossible to complete. I changed the logic so that after placement, each number is checked to see if there are spaces to the right and left or above and below. If not, the number is moved somewhere else and re-checked. This vastly decreased the possibility of generating incompletable stages, but not entirely. Very occasionally you might end up with something like this:
#
# #
#1#
The check shows that the top and bottom spaces are clear, but not really because the top space is not really accessible but has been blocked off to access by the character. The number of blocks placed per round is equivalent to the number of the round multiplied by two, so this possibility is very rare. Even on level nine there will only be 18 random blocks placed on screen. But to prevent frustration I added the ability of the player to press R to redraw any stage and allow play to continue. So check your stage before setting out! The object of the game is to complete the 9 stages before 1000 seconds run out. The faster you complete, the higher your score. High score is saved. When you complete the puzzle Beethoven's 'Ode to Joy' is played. I tried to translate the music from an updated version that Taisuke also posted. It's not a very good job, but my son Charlie is away at university, and he's my musical expert. Perhaps when he comes back at Christmas I get him to take a listen and try to improve on my poor job.
Here's a video that Taisuke posted showing his updated version with music:
Here is a video of my port. I have made some changes since making this video. Now the counter counts down to zero and a higher score is the score with the most seconds left on the clock when stage 9 is completed, which is a bit more intuitive. I also added the R redraw function to the instruction screen.
Anyway, hi to the folks doing the RetroChallenge 2017/10! I've been peeking around a little but hope to have some more time soon to check out the other projects being done. If you are not one of the participants please check out the RetroChallenge website.
![]() |
| The MSX Version with boy and girl characters |
This one seemed to display a simple text like game. The author explained that they had created a puzzle game inspired by the game Binary Land. He called his game Binary Room. I suspect this was because it involved a simple rectangle with some randomly placed blocks in it, rather than complex set puzzles/mazes. The movement system was the same though, with two "characters" A and B being maneuvered in a mirror like fashion. The object of the game was to move them so that they straddle numbers in sequence. Each stage has a set of numbers equal to the stage number randomly placed in the room, up to stage 9. Here's the source code for the game as listed by Taisuke Fukuno, who I take to be the programmer, although he might just be the person responsible for the "Create Everyday" website.
The questions marks represent PRINT commands. The LCx,y commands are equivalent to PRINT@ or LOCATE commands in MS Basics. SCR(x,y) commands do the job of checking the character values stored at specific screen locations. The rest are pretty much standard Basic.1 'BINARY ROOM
10 S=1 15 CLS:LC4,0:?"STAGE:";S
20 FOR I=0 TO 15
30 LC8+I,2:?"#":LC8+I,17:?"#"
50 LC8,2+I:?"#":LC23,2+I:?"#"
70 NEXT
80 SRNDS:FOR I=1 TO S*3
90 X=RND(12)+10:Y=RND(12)+4:IF SCR(X,Y) CONT
100 LCX,Y:IF I%3 ?"#" ELSE ?I/3
110 NEXT
120 X=15:Y=16:V=16:W=16:C=1:CLT 125 K=INKEY()
130 A=-(K=28)+(K=29):B=-(K=30)+(K=31)
140 IF SCR(X+A,Y+B)=0 LCX,Y:?CHR$(0):X=X+A:Y=Y+B
150 IF SCR(V-A,W+B)=0 LCV,W:?CHR$(0):V=V-A:W=W+B
160 LCX,Y:?"A":LCV,W:?"B" 165 LC(X+V)/2,(Y+W)/2:IF SCR()-48=C IF Y=W AND ABS(X-V)=2 OR X=V AND ABS(Y-W)=2 ?CHR$(0);:C=C+1:IF C=S+1 LC4,20:?"CLEAR!":WAIT30:IF S=9 END ELSE S=S+1:GOTO 15
170 LC16,0:?"TIME:";TICK()/60:WAIT3:GOTO 125
I found that the logic for placing the numbers was completely random, so sometimes they could be placed in a way, depending on where other numbers and blocks were placed, that there was not room on either side or above and below, to maneuver the characters around it to straddle it. This would make a stage impossible to complete. I changed the logic so that after placement, each number is checked to see if there are spaces to the right and left or above and below. If not, the number is moved somewhere else and re-checked. This vastly decreased the possibility of generating incompletable stages, but not entirely. Very occasionally you might end up with something like this:
#
# #
#1#
The check shows that the top and bottom spaces are clear, but not really because the top space is not really accessible but has been blocked off to access by the character. The number of blocks placed per round is equivalent to the number of the round multiplied by two, so this possibility is very rare. Even on level nine there will only be 18 random blocks placed on screen. But to prevent frustration I added the ability of the player to press R to redraw any stage and allow play to continue. So check your stage before setting out! The object of the game is to complete the 9 stages before 1000 seconds run out. The faster you complete, the higher your score. High score is saved. When you complete the puzzle Beethoven's 'Ode to Joy' is played. I tried to translate the music from an updated version that Taisuke also posted. It's not a very good job, but my son Charlie is away at university, and he's my musical expert. Perhaps when he comes back at Christmas I get him to take a listen and try to improve on my poor job.
Here's a video that Taisuke posted showing his updated version with music:
Anyway, hi to the folks doing the RetroChallenge 2017/10! I've been peeking around a little but hope to have some more time soon to check out the other projects being done. If you are not one of the participants please check out the RetroChallenge website.
Sunday, 15 October 2017
RetroChallenge 2017/10: Zector Adventure
"Zector Adventure" is a text adventure program distributed by T&D Software in 1984. From a clue in the game itself it seems like the original programmer's name was Darrell Ulm and that he had subtitled it Adventure #1. It is science fiction themed and based roughly on the original Star Wars film. You must escape from the Death Star with some battle plans that will help aid the rebel fleet defeat the station you are on.
![]() |
| The Game's Handy Map Feature |
The original version was programmed for the TRS-80 Color Computer. It has a hires graphics "MAP" command that shows you your progress. In porting it to the MC-10 I had to change the map command to display a simple text graphics map instead. I used a subroutine to translate the former graphic commands to insert into a text array space "O" characters for rooms and "-" and "!" characters for passages that you haven't explored yet. I also added a circular "Death Star"graphic into which the unfolding map is inserted.
I also fixed up a tonne of spelling mistakes. So I guess you could call the MC-10 version a bit of a "fix" of the Coco version. The author, for example, had spelled the "examine" command as "exemine" and many of the words with "ie" were spelled with "ei" instead. I suspect, he was a teen programmer. The game is a lot like the classic game "Dog Star Adventure" written by Lance Micklus for TRS-80 and published in SoftSide magazine. I have also ported that game to MC-10:
I played through Zector Adventure and created the following walkthrough, which has been posted on the CASA Solutions Archive website:
PUSH BLUE, E, GET GARBAGE, S, S, E, GET SUIT, W, W, W, GIVE GARBAGE, E, PUT QUARTER
N, W, LOOK COMPUTER, TYPE D$8, GET CARD, E, S, W, W, S, E, S, GET GRENADE, E, S, N, W,
N, E, E, LOOK CREW, SHOOT MEMBER, LOOK, GET STEEL, W, W, S, E, S
THROW STEEL,LOOK, MAP, W, GET DISKS, INV, E, N, W, N, E, E, N, N, N, W, W
PUT CARD, LOOK, N, THROW GRENADE, DROP DISKS, E, LOOK TERMINAL
TYPE OPEN, W, S, MAP, W, GET PLANS, E, E, PUSH RED, E
I hope you enjoy the Zector Adventure!
I also fixed up a tonne of spelling mistakes. So I guess you could call the MC-10 version a bit of a "fix" of the Coco version. The author, for example, had spelled the "examine" command as "exemine" and many of the words with "ie" were spelled with "ei" instead. I suspect, he was a teen programmer. The game is a lot like the classic game "Dog Star Adventure" written by Lance Micklus for TRS-80 and published in SoftSide magazine. I have also ported that game to MC-10:
****** WARNING SPOILER ALERT ******
PUSH BLUE, E, GET GARBAGE, S, S, E, GET SUIT, W, W, W, GIVE GARBAGE, E, PUT QUARTER
N, W, LOOK COMPUTER, TYPE D$8, GET CARD, E, S, W, W, S, E, S, GET GRENADE, E, S, N, W,
N, E, E, LOOK CREW, SHOOT MEMBER, LOOK, GET STEEL, W, W, S, E, S
THROW STEEL,LOOK, MAP, W, GET DISKS, INV, E, N, W, N, E, E, N, N, N, W, W
PUT CARD, LOOK, N, THROW GRENADE, DROP DISKS, E, LOOK TERMINAL
TYPE OPEN, W, S, MAP, W, GET PLANS, E, E, PUSH RED, E
I hope you enjoy the Zector Adventure!
Friday, 6 October 2017
RetroChallenge 2017/10: Atanarjuat
This was just a silly little program I put together over the course of an evening. I don't know where the idea came from. Probably while browsing images of 8-bit Basic games. I think I saw a picture of a simple maze that used the basic principle of alternating vertical lines with random hole put in them. The thought struck me that the number of random passages would determine the difficulty of the maze. Then I thought, hey could an A.I. beat a human being in navigating such a maze? I mean, it could be made to ruthlessly search for a way across as it moved up and down, but unlike a human it could not survey the maze as a whole to discern where the zones of parallel horizontal passages were most richly laid out and navigate towards them. So I made an A.I. that just moves up and down the passages seeking a way right. It takes the first way it finds and continues right until blocked. If it hits a block at top or bottom, it reverses directions and continues looking for a right passage. Of course, creating an algorithm that is fast took a little thinking, but I got one that allows plenty of time to pole the user for input so that navigation for the player is pretty smooth. The brute force of the computer provides a real challenge for a human player. I fiddled with the number of passages for each row to a point that I felt the game was challenging, but not impossible for a human to sometimes beat the computer. In future I might play a little with the variables that draw the maze and see if making more passages makes it much harder or easier to beat the computer. I named the game after a legendary Inuit character "The Fast Runner" or Atanarjuat. There is also a famous film made by an Inuit director of that name. The story originally centres on a clan feud and monumental revenge quest. So in my game I decided to add the feature of being able to hit space and lay down a "block", which can trap the computer player in a row if placed right.
Friday, 22 September 2017
RetroChallenge 2017/10: Fly Wheel
When I have an idea for game, there can sometimes be a number of false starts before I get something that works. This is the case for my game Fly Wheel. Originally I thought I might be able to recreate the shifting 3 dimensional highway affect of Pole Position type games using a complex algorithm to adjust the road to represent straightaways and curves and sections of strings for moving the horizon with shifting mountains and clouds. My first attempt was rather crude. It kind of worked, but it was obviously going to be far too slow once I added all the code needed for a full game, such as being able to move the car, collision detection, scoring etc. Here's what my first attempt looked like:
Pretty funky that snaky road! The car looks a little weird too. What I needed was something much simpler for the road graphics. Nothing sprung to mind, and so I let the project languish. Then I paid a visit to a site for ZX81 programming that I have been visiting on and off for some time maintained by Steven Reid. He, like me, is an old 1980s BASIC programming hack who really enjoyed (enjoys) cooking up programs for his beloved Sinclair machine. I've created programs based on some of his ideas, such as Tower Dodge and Joust. This time I spotted his game "Fly Wheel." What it showed me is that creating the illusion of moving road curves could be as simple as slanting two perspective lines creating the road from joining at the centre of the horizon to joining a little to the left or right. Like this:
He also provided inspiration for the other elements for a game of this type such as how to depict the horizon (a simple unmoving city skyline) as well as some other nice graphic touches, such as the starting line and explosion when you die:
It's obvious that Steven got a real kick out of coming up with compelling visuals for games on his limited little machine (only 4 chips!). I can't imagine all the hellishly complex keystrokes he must have had to execute on the ZX81's infamous membrane keyboard to get the graphics characters input into strings on a real machine. Nor the horrors of the ZX's infamous ROM pack wobble possibly obliterating all his work before it could be saved to tape. It's nice to program these days in a Windows editor and then "quicktype" it into the VMC10 emulator.
The ZX81 has lowres graphics in the resolution 64X48, which is just like the resolution of the MC-10 when you put it in Semigraphic 6 mode (POKE 49151,28 or POKE 49151,68). The only difference is that the MC-10 doesn't allow mixing of text with graphic when in that mode. But that's okay. It just means using cut scenes to display messages, such as the score. The advantage of the MC-10 is that its Basic runs must faster than the ZX81's, especially if you use as few variables as possible, and other speed up techniques that I have built up over the years. So unlike Steven's game, mine is actually a little more than somewhat challenging. As Steven is obviously aware (just read his many blog postings) it was very easy for ZX user's dreams for their Basic game programs to far exceed their grasp, but that was okay back then, when half the fun was simply getting something to work. It's still fun now.
The higher speed allowed me to add a feature I wanted in the game from the beginning. I wanted the car to drift to the outside of a curve as you took the corners. In my program there are actually two degrees of road curve and the sharper the curve the more the drift. You therefore must continuously counteract the drift when cornering and be sensitive to the different degrees of curve that you are currently on. Straightaways don't have drift, but they do have a little bit of randomness. Your car will occasionally bump right or left, so you also have to be a little careful on the straight sections.
Steven's program was based roughly on Atari's Night Driver game, so the other cars appear only as oncoming tail lights. I borrowed his model of how to show the progression of those lights in size and spacing, and then, thanks to the two colours available in SG6, made them red. They come down the road in a line starting at a random location at the top, so they are either some degree left, central, or to the right side of the road. Where they appear gives you some warning of the path they will take. If needed, you can drive a little over the edge of the road, but you lose points every time you do and if you go too far over the edge your tires go and your car blows up. So the trick for getting high score is trying to limit the number of times you overshoot the edge as much as possible. A little sound attends any move over the edge. Thanks to Robert Sieg for providing me with a POKE routine that allows this sound to be generated while in SG6 mode (Q=PEEK(9)AND128:POKE49151,4+Q:POKE49151,128-Q+4). This routine works for the POKE 49151,28 colour set. Using the normal SOUND command automatically takes you out of SG6 and bumps you back into normal text mode.
Generating the sequence of the curves was something I simply encoded into DATA statements. Each cycle through the main loop a road variable is read indicating straight, or one of two degrees of left or right curve. Then I just coded the sequences of numbers for a simple oval, a slightly more complex liver shaped track, and a multiple tight-hairpin-curve track. The score you achieve is a sum of how far you go through these variables, minus any times you have gone over the edges and multiplied by the degree of difficulty of track (1-3). I have found it easiest to keep to the inside of curves as you try to counteract drift, so it's a good idea to study the maps and make preemptive moves on straightaways to get positioned for the upcoming curves. Thanks to Pippa from over on the CASA Adventure database forum for showing me the PEEKs and POKEs to reset the pointer for the READ statement. This allows me not to have to re-read all the prior DATA again for the other tracks each time you restart, which really helps speed things up.
Find position of next date item to be READ and store it in variable E:
E=PEEK(173)+256*PEEK(174)
Restore next READ to the E position:
POKE174,INT(E/256):POKE173,E-256*PEEK(174)
I'm under no illusions that this game is a rival to a real Pole Position or night driver game. Like Steven, I'm just in it for the challenge of seeing whether a certain vision for a game can be carried out given the limits of the machine and the limits of Basic as a programming language. I think the game I have come up with is a nice extension of Steven's concept. In particular I'm really pleased about how I was able to make use of the only two other useful characters (dark green and light green blocks) that are available in SG6. Because of the way the MC-10 was wired by Tandy, the lower 128 characters are not really rendered properly and simply show up as varying (ugly) sequences of green and dark lines. But the two useful ones (solid dark and solid green) provide some contrast to the red and blue graphics characters. I like the "brooding" green night skyline and the dark green tires actually alternate with one's with an outer light line to add some effect of tire movement. In Steven's program for ZX the skyline is rendered by the light grey stippled block character, as are the tires, with an alternating stipple to give the tires the illusion of motion. It was a neat challenge to figure out how to achieve similar effects using the MC-10's quirky semi-graphics. I have also figured out a way to render chunky alphabetic characters using only the graphics blocks, which I used on the start/finish sign.
Thanks to Steven Reid for the inspiration and to John Linville for running another RetroChallenge. Please feel free to comment.
He also provided inspiration for the other elements for a game of this type such as how to depict the horizon (a simple unmoving city skyline) as well as some other nice graphic touches, such as the starting line and explosion when you die:
It's obvious that Steven got a real kick out of coming up with compelling visuals for games on his limited little machine (only 4 chips!). I can't imagine all the hellishly complex keystrokes he must have had to execute on the ZX81's infamous membrane keyboard to get the graphics characters input into strings on a real machine. Nor the horrors of the ZX's infamous ROM pack wobble possibly obliterating all his work before it could be saved to tape. It's nice to program these days in a Windows editor and then "quicktype" it into the VMC10 emulator.
The ZX81 has lowres graphics in the resolution 64X48, which is just like the resolution of the MC-10 when you put it in Semigraphic 6 mode (POKE 49151,28 or POKE 49151,68). The only difference is that the MC-10 doesn't allow mixing of text with graphic when in that mode. But that's okay. It just means using cut scenes to display messages, such as the score. The advantage of the MC-10 is that its Basic runs must faster than the ZX81's, especially if you use as few variables as possible, and other speed up techniques that I have built up over the years. So unlike Steven's game, mine is actually a little more than somewhat challenging. As Steven is obviously aware (just read his many blog postings) it was very easy for ZX user's dreams for their Basic game programs to far exceed their grasp, but that was okay back then, when half the fun was simply getting something to work. It's still fun now.
The higher speed allowed me to add a feature I wanted in the game from the beginning. I wanted the car to drift to the outside of a curve as you took the corners. In my program there are actually two degrees of road curve and the sharper the curve the more the drift. You therefore must continuously counteract the drift when cornering and be sensitive to the different degrees of curve that you are currently on. Straightaways don't have drift, but they do have a little bit of randomness. Your car will occasionally bump right or left, so you also have to be a little careful on the straight sections.
Steven's program was based roughly on Atari's Night Driver game, so the other cars appear only as oncoming tail lights. I borrowed his model of how to show the progression of those lights in size and spacing, and then, thanks to the two colours available in SG6, made them red. They come down the road in a line starting at a random location at the top, so they are either some degree left, central, or to the right side of the road. Where they appear gives you some warning of the path they will take. If needed, you can drive a little over the edge of the road, but you lose points every time you do and if you go too far over the edge your tires go and your car blows up. So the trick for getting high score is trying to limit the number of times you overshoot the edge as much as possible. A little sound attends any move over the edge. Thanks to Robert Sieg for providing me with a POKE routine that allows this sound to be generated while in SG6 mode (Q=PEEK(9)AND128:POKE49151,4+Q:POKE49151,128-Q+4). This routine works for the POKE 49151,28 colour set. Using the normal SOUND command automatically takes you out of SG6 and bumps you back into normal text mode.
Generating the sequence of the curves was something I simply encoded into DATA statements. Each cycle through the main loop a road variable is read indicating straight, or one of two degrees of left or right curve. Then I just coded the sequences of numbers for a simple oval, a slightly more complex liver shaped track, and a multiple tight-hairpin-curve track. The score you achieve is a sum of how far you go through these variables, minus any times you have gone over the edges and multiplied by the degree of difficulty of track (1-3). I have found it easiest to keep to the inside of curves as you try to counteract drift, so it's a good idea to study the maps and make preemptive moves on straightaways to get positioned for the upcoming curves. Thanks to Pippa from over on the CASA Adventure database forum for showing me the PEEKs and POKEs to reset the pointer for the READ statement. This allows me not to have to re-read all the prior DATA again for the other tracks each time you restart, which really helps speed things up.
Find position of next date item to be READ and store it in variable E:
E=PEEK(173)+256*PEEK(174)
Restore next READ to the E position:
POKE174,INT(E/256):POKE173,E-256*PEEK(174)
I'm under no illusions that this game is a rival to a real Pole Position or night driver game. Like Steven, I'm just in it for the challenge of seeing whether a certain vision for a game can be carried out given the limits of the machine and the limits of Basic as a programming language. I think the game I have come up with is a nice extension of Steven's concept. In particular I'm really pleased about how I was able to make use of the only two other useful characters (dark green and light green blocks) that are available in SG6. Because of the way the MC-10 was wired by Tandy, the lower 128 characters are not really rendered properly and simply show up as varying (ugly) sequences of green and dark lines. But the two useful ones (solid dark and solid green) provide some contrast to the red and blue graphics characters. I like the "brooding" green night skyline and the dark green tires actually alternate with one's with an outer light line to add some effect of tire movement. In Steven's program for ZX the skyline is rendered by the light grey stippled block character, as are the tires, with an alternating stipple to give the tires the illusion of motion. It was a neat challenge to figure out how to achieve similar effects using the MC-10's quirky semi-graphics. I have also figured out a way to render chunky alphabetic characters using only the graphics blocks, which I used on the start/finish sign.
![]() |
| The start sign with graphic text |
![]() |
| Cars collide |
![]() |
| First level of left turn (car coming!) |
![]() |
| 3 Tracks with starting direction indicated |
Here's a video of the game running. I have chosen Track 3 (I think):
Thursday, 21 September 2017
RetroChallenge 2017/10: Pyramid Solitaire
I saw my wife playing Pyramid Solitaire on the MS solitaire games collection for Windows 10. I immediately thought, hey you don't need a Windows 10 class computer to play a simple game like that! I could program that on an MC-10! I dug out a game I had converted recently from Coco Basic. Solo Poker by James Garon. I had seen the original in a video by the HighRetrogamingLord:
I had simply converted it from using the hires graphics screen to using lowres Semigraphics 4 representations of the playing cards.
I had created this card set for several prior card games like Crazy 8s. Since Garon had worked out a nice little routine for "shuffling" the deck and I had already worked out routines for displaying the cards, all I had to do was figure out the rules to Pyramid Solitaire and put those routines to use. I ran the MS Card games pack and called up the help screen for Pyramid Solitaire. A little research on Wikipedia helped clarify some issues.
First I made a routine to lay out the first 28 cards out from the randomized deck in a pyramid, starting with the top card. Then I created a simple cursor routine to jump between the cards in a diamond direction pattern using the ASZX keys. It just checks that it doesn't jump off into the cyan border area around the cards. As part of that routine I took note of the card value of the current card highlighted by the cursor. Hitting (Enter) would select and reverse video that value and then allow you to move again to select another card, or simply choose from the deck (D) or from the wast pile (W). Pressing (C) would cycle the cards from the deck to the waste pile for a max of three cycles.
The biggest challenge was creating a refresh routine for the pyramid that would recreate the proper illusion of the cards lying on top of each other with some being only partially revealed as they alternate from top to bottom. In the end it was simplest just to blank the removed cards and then refresh the pyramid from top to bottom and the top of the piles, but leaving out removed cards.
The whole process took surprisingly little time. I am getting proficient creating simple card games. Don't know what to try next, but if anyone out there has any ideas of card games they would like brought to the MC-10, or Coco, just let know. Here's what the final product looked like:
And this is what happens when you win:
After playing the game for a while I got much better at it. At one point I had a real run of victories. 5 to be exact, with no losses. A total fluke I think.
First I made a routine to lay out the first 28 cards out from the randomized deck in a pyramid, starting with the top card. Then I created a simple cursor routine to jump between the cards in a diamond direction pattern using the ASZX keys. It just checks that it doesn't jump off into the cyan border area around the cards. As part of that routine I took note of the card value of the current card highlighted by the cursor. Hitting (Enter) would select and reverse video that value and then allow you to move again to select another card, or simply choose from the deck (D) or from the wast pile (W). Pressing (C) would cycle the cards from the deck to the waste pile for a max of three cycles.
The biggest challenge was creating a refresh routine for the pyramid that would recreate the proper illusion of the cards lying on top of each other with some being only partially revealed as they alternate from top to bottom. In the end it was simplest just to blank the removed cards and then refresh the pyramid from top to bottom and the top of the piles, but leaving out removed cards.
The whole process took surprisingly little time. I am getting proficient creating simple card games. Don't know what to try next, but if anyone out there has any ideas of card games they would like brought to the MC-10, or Coco, just let know. Here's what the final product looked like:
Subscribe to:
Posts (Atom)













