Wednesday 26 September 2018

RetroChallenge 2018: Finally Done?

End Credits
Made a few final bug fixes that quash minor non-critical visual quirks. The dragons didn't initialize properly if they showed up on the first screen at the Gold Castle. Tried to deal with the possibilities of "spawn killing" when you enter a room and a dragon is right on top of you. Now placement is confined to the centre area.  This should leave a little space for you to enter rooms, and if you're quick, get out or move away before the dragon or bat can get you. Replaced all two character string variables with single character variable names. Anything to help a little with speed.

Think the game is winding down to completion.  Can't think of any major changes, besides adding some better sound or music. Still might put an upside-down dead dragon graphic in, but I'm not feeling motivated to create such flourishes. Perhaps, when my son Charlie is home for Canadian Thanksgiving he'll be able to give me some feedback for improvements. But the contest will be finished by then. So I think this might be it for posting.

Tuesday 25 September 2018

RetroChallenge 2018: That Pesky Bat

The Bat Swoops In!
Noticed another quirk in game play that needed ironing out. If you entered a room with the bat in it and dropped the item you were carrying, the bat would fly to you, notice you weren't carrying anything, exit the screen and choose a random item from anywhere in the dungeon to move.  This made it too easy to avoid the bat stealing important stuff from you.

Now you can't just drop an item to avoid the bat stealing it from you. The bat will always steal an item from the room you're in, if it catches you and if one is available.  If not, then it will pick a random item from somewhere random in the dungeon and move that.

Also, I sped up the whole routine of the bat moving things. This means that when you're moving around and the bat is moving things off screen, the pause in your movement is much less noticeable (I hope).  Also I tweaked the levels so there is more delay between mouth opening and closing at the lowest level than at the highest.  There was too little difference between level 1 and level 3, at least when it came to killing dragons (i.e. striking when their mouths are closed).  Also, I increased the contrast between the three types of dragon, so purple (Barney) is more clearly less threatening than the blue dragon (Blue Streak).

Made it so items and dragons can appear in the Yellow Castle room. For some reason I had considered this room out of bounds for items and dragons being placed there. Can't recall my thinking, but it will help speed things a little not to exclude it.  This change also allowed me to tweak the routine that places the sword at the beginning of the game. Now, on levels 1 and 2, the sword will always show up in one of the rooms near your starting position at the Yellow Castle or by the castle itself.  But on level 3, there is a chance the sword will be hidden in one of the big rooms near the White Castle, which will make for a little more challenge in getting armed.

I'll put the new version up in the regular places soon. Until then it's on Github. ADVENTR37.TXT

https://github.com/jggames/trs80mc10/tree/master/quicktype/Dungeon/Adventure

Sunday 23 September 2018

RetroChallenge 2018/09: Reorganize My Games Pages


Last month my son was home from university. He's pretty good at Javascript, so I got him to help me download Mike Tines Javascript MC-10 emulator from Github and get it up and running from my own file space at the university where I work. He was able to figure out what needed to be tweaked in the code to get it happily running from another net space. I then set to modifying the code to change some modifications Mike had made to the standard MC-10 font. Lots of folks complain about the font. It's pretty quirky, with its square O and narrow 0. Mike didn't like the original G either. But I'm a bit of a purist and I have used some of the quirks to my advantage in games. The square O makes a nice box for example, for use in Sokoban. So I switched the byte codes back to recreate the original font.

Then I set about reorganizing the web page launcher for the code to contain menu listings of my programs. I have over 300 programs now for the MC-10 so I had to figure out a way to break the list into categories. I eventually settled on 4 categories: (1) Classic Basic Games, (2) My Own Original Programs, (3) My Text Adventure Ports (and 2 original adventures), and (4) All My Other Ports.  This meant that each menu could be a more reasonable length. I started editing my web pages so that if you clicked on a picture of the game it will take you to the appropriate Javascript page that will contain a menu listing to the program. I haven't fully completed the process, but I have got the process mostly completed for 2 of my web pages:

My main software Page:

My Text Adventures Page:

My Original Games and Program Ports Page is partially done (not fully checked yet):

So for example if you want to play my recent Atari Adventure game, it is listed at the top of the menu as "Adventure" here:
Just click on the "- Select Cassette -" menu, select "Adventure", and then type RUN and hit ENTER on the main MC-10 screen of the emulator.

Thanks Charlie for your help. Thanks Mike for putting your code up on Github and for letting me host it on my own file space. It's a useful resource for the MC-10 hobby community. I am hoping to integrate the Classic Game page into a course I am working on for the history and philosophy of computing.  Charlie might even trying modifying the code further to autolaunch games directly from a html link.

Thursday 20 September 2018

RetroChallenge 2018/09: Fine Tuning Atari Adventure in BASIC


This demo shows a lucky placement of the chalice in the outer part of the White Castle. Only one dragon death. I have decided to keep the limit on lives to 3 respawns before you "fail in you quest." Made a few other final minor fixes and dummy proofing. Can't drop items in doorways or the very edges of rooms. This prevents you from overwriting them when you enter a room. It also prevents misplacement of objects when they wrap around to the other side of the screen. I could get rid of this visual quirk, but I would rather have the speed.

There is some further complexity to the hoops you must jump through to get the micro dot. Specifically a time limit on how long the hole made by your bridge will work/stay open. If you are not quick and don't time your movements right (you'll have to notice the rhythm of the bat moving stuff in the background. It is possible the wall you have bridged with the H can be redrawn trapping you, if you're not careful. Pretty tricky on level 3 when the time limit (i.e. time span between bat moving things in the background) is shortest. Tricky, but possible (I've tested it). It will be a rare breed who can figure out how to obtain the micro dot, that's for sure.

Project is pretty much done. Fun Retrochallenge. Thanks John!

Wednesday 19 September 2018

RetroChallenge 2018/09: Adventure Lose Routine


So the more I thought about it, the more I realized that the game really did need a way to lose.  So I modified it so that you have three respawns from being eaten, but then failure. I also found some more efficiencies in the main avatar movement routine, so the motion is just that little bit faster and smoother.  Hope I haven't introduced any novel bugs.  It's getting tedious to play to test every minor mod--the maps are getting pretty familiar and the novelty of exploration has worn off. Still, I need to do some more testing to fully determine if three respawns is the right number, or perhaps it should be that on the third strike you're out (i.e. just two respawns or three "lives"--there's something existential about reckoning "lives").

Also, I fixed a bug in the bat routine that was preventing it from disappearing after it swoops in and hits you.

I've posted the new version to my VMC10 distro, Google files directory, and Github.

Tuesday 18 September 2018

RetroChallenge 2018/09: Atari Adventure in BASIC Beta Release

The following video shows a walkthrough to an ordinary win of a game played at level 3. But there is also an easter egg to figure out, which will be reported on the final screen if you succeed in that task. Hope I have got all the essential elements in place and that the code is as efficient as possible.  I might place a limit of three on the number of times you can be killed before you "fail in your quest."  Right now the game seems a little too forgiving.


I have been adding lots of tweaks to the bat routine to make it run as quickly as possible in the background. Still, you will notice an occasional pause of your avatar as the bat filches something from a room off screen. Occasionally this will result in something, including dragons, being dropped into your current screen.

Now when you get eaten, you respawn without the item you were carrying. It is randomly placed in the room where you were killed.

The sound is minimal. We'll see if my son Charlie can suggest or come up with any interesting additions. Not sure if it is a very exciting game, but it is an interesting exercise as least in creating a virtual world in BASIC. Quite proud at how the mazes turned out and that I was able to cram them into a 20K MC-10.  

What's missing?

The magnet. My  random item placement routine doesn't put objects where they can't be reached. This effect would simply have slowed the game too much, and I wasn't convinced it was a particularly significant part of the game play. Maybe there is another element or item that can be added in its place to add complexity?

Complex Behaviour. Robinett was quite proud of the complex interrelationships between objects. In variations of the game the objects affect each other differently (attracting/repelling). A bit too much to render in BASIC without slowing things down terribly. In my version dragons just attack, bats swoop in and then out. And there can only be one enemy on screen at a time. Yet I think I have come as close as possible within the limits of BASIC to present the essence of the game.

Dead Bodies. There are no dead dragons lying around where you slayed'em. Just a little blood from your sword. I might still add an upside down dragon death scene. My code cleaning has turned up some extra space for flourishes to be added.

Well my semester is heating up now so I'm not sure I will post much else. This is where I hoped to reach in this particular project. Good luck to everyone else doing the RetroChallenge!

Link to WAV file for any folks who might want to play it on an original machine: https://drive.google.com/open?id=157VTdjQI6HQUsQIHJgLXhncQoZEYfuVf
Or it can be played on a Javascript emulator here: http://faculty.cbu.ca/jgerrie/MC10/JG_MC10.html

Monday 17 September 2018

RetroChallenge 2018/09: First Distro of Atari Adventure in Interpreted BASIC


Here's a first distro of my new Atari Adventure-like game for the TRS-80 MC-10. It can be played on Mike Tinnes Javascript emulator. Load the first file on the menu "ADVENTR" and type RUN and hit ENTER.

I've got the bat routine to a point where it will swoop in and steal items you are carrying. It will also occasionally swoop in and just knock the item you are carrying out of your hands. It also moves items in the background, but not the chalice or the micro dot. But it will move dragons, which it will occasionally drop into the room you are in.

I've also added levels. This just makes the dragons faster and increases the frequency of the bat's annoying activities just described.

As usual, I've also found some speedups. Reworked the declaration of the variables, killed some dead code from the earlier variations. Removed repetitious actions between interacting subroutines. That kind of thing.  Always amazes how many of these things show up even when I feel I have sifted the code so thoroughly there couldn't possibly be a more efficient way of getting things done.

Here's where you can find the code for those who are interested (ADVENTR25.TXT): https://github.com/jggames/trs80mc10/tree/master/quicktype/Dungeon/Adventure

Feedback welcome.

Sunday 16 September 2018

RetroChallenge 2018/09: Atari Adventure in Basic Lost Sword


Just can't catch a break in this one. Lost my sword and just keep running into bats and dragons. I have added random "Bat" movement of items off screen. Sifted the code for speedups, including renumbering by increment of 1. Added instructions. Here are the instructions:


Also added a T-pattern for the keys-- IJKL. My son Charlie likes the T, and he's my beta tester, so he gets the T. Found a neat graphic online that I tweaked. Might use it as a new online avatar now that I am into my 50s.


Hope to get a peek at everyone else's RetroChallenge projects shortly. Been working intensely on Adventure, but now I should have some time. I can just glide into the final stretch with some game testing and combat tweaking. I might add some levels to the game. Perhaps the amount of bat background item moving, bat speed and the speed of the dragons (movement and length of time between mouth-open-mouth-closed cycling) can be adjusted.

Saturday 15 September 2018

RetroChallenge 2018/09: Atari Adventure Combat Working and Bat

Got combat with the dragons working, although there is an error that appears near the end of the following video because the Red Dragon conflicts with the characters for the Red Castle. That dragon is now blue (as in blue streak). It's the fastest!
The Bat also works (I think). It will steal your item if it touches you and then fly off. The item will be randomly redistributed somewhere in the maze, but not inside any castles. so you can get it again.  The bat will also then relocate. Fixed up the win routine a little as well.
I think all I have left is cleaning and speeding up.  Possibly some refinement to the speed and behaviour of the dragons and the sound. Maybe some simple instructions if I can cram them in (I'm down to only 1000 bytes or less). Any suggestions are welcome.

Friday 14 September 2018

RetroChallenge 2018/09: Atari Adventure Moving Objects TRS-80 MC-10 Version in BASIC


I have worked out most of the kinks in all the moving objects routines and have a simple win routine.  I have added a routine to distribute the objects randomly at the start of the game. The only hurdles left are dragon combat and bat object snatching. Think these routines should be relatively easy to implement.


In the video above I search first for the "micro dot." I must use the bridge "H" to gain entrance to the secret room in the Red Castle (my replacement for the "Black Castle"). When the dot is dropped in Room 4 access is granted to the secret room with my version of the easter egg. Then I continue searching for the chalice "X" which I take and drop in the Yellow Castle. This wins the game.

I'm going to have to make some decisions about combat with the dragon. I have two main options I am considering.  (1) When you have the sword Dragons run from you and try to escape the room. So you will have to be quick and stab them before they leave. But if you don't have the sword, then they chance you and you have to be quick to escape the room before they touch you.
(2) Dragon has a mouth open phase and a mouth closed phase, it always tracks you, not matter what.  So you must be quick in getting hits in while it is in mouth the closed phase.

In either case, I'm not sure how many hits will kill either you or the dragon. I'm thinking of starting with 3 strike and either is out (versus the original's 1 hit kills). I will have some ability to have different speeds for the dragons, but I'm unsure whether higher speeds will disadvantage the player too much, so I might just go with one speed. I could also have more than 3 dragons if the game requires higher challenge.  We'll just have to see which of all these variables works best. There will only be one dragon or bat in a room at a time.

Thursday 13 September 2018

RetroChallenge 2018/09: Item Movement for Atari Adventure in BASIC

Got some item movement mechanics working for the TRS-80 MC-10 version of Atari Adventure in BASIC. Dragon is moving a little faster too. The drawbridge goes up now
Had to make some compromises in my graphic design for items for the sake of speed. Still worried about the combat and whether I can make it challenging but not arbitrary. If that can be done, then I'll move on to also using the dragon routine as the basis for bat movement.  Probably will have to limit things to one monster per room at a time as a concession to the limits of BASIC. Then it's just a question of creating routines to distribute items and monsters and detect the winning conditions.  I'm pretty confident now I can get a functioning game of some sort completed by the end of the month.  It's now just a question whether it will be mildly interesting (about the best you can hope for any BASIC game), or a functioning dud.

Wednesday 12 September 2018

RetroChallenge 2018/09: Attack of the Dog Duck


Worked up some simple graphics for a kind of a dragon that will track the player. Not sure if it is fast enough to be challenging or how exactly to work out combat. I have a version of my duck-dog-dragon with its mouth open, so I will probably have it cycle between mouth open mouth close. You'll have to get your attacks in while its mouth is closed. Here are some of the other graphics possibilities I have been working on:


Starting to run into some of those barriers of speed that I mentioned last post. I uncertain at this point whether BASIC will allow me to move the program to a point that it represents an actual game. It might simply end up an interesting demo of some aspects of Atari Adventure. But, if I had a Basic compiler...;)

RetroChallenge 2018/09: Atari Adventure Catacombs

I've completed a routine to render the partial sight of the catacombs in Atari Adventure.


I've been watching videos of game play.  Hadn't realized that some of the screens allowed only a partial "torchlight" view around the main avatar. Had to shift the map routine from straight printing of the current room, to assigning those strings to a 0-15 string array. Then I could just use MID$ to print a 5 X 5 selection of those strings around the main character. Seems to work.  It has a little flicker, because I have to use CLS0 continually to erase the previous draw, but I notice that the original has a little flicker too.

Next steps will be tougher I think.  I need to create routines for moving dragons and the bat around the world, even when they are not on screen, but to display them when they are in the room as the player. They'll also after to track the character in interesting ways like in the original.  Here's a neat video where the Robinette (the author of the original) outlines some of his unique approaches to managing the behaviour of objects and beings in the world:


I don't know if I'll be able to recreate in BASIC all the complexity he describes without slowing player movement down to an unacceptable level. I might have to make some compromises. Perhaps more but slightly less interesting dragons (I'm thinking up to 8--one for each colour). Same for the bat. It might have to be swapped for a less dynamic random re-shuffler of objects routine, with a little stock animation. We'll see what's possible.

This kind of uncertainty is part of the charm of retro-programming in BASIC. You just never know if something is going to be possible--like the partial torch view. Feels great when you do succeed. But then again, even if you don't, this just provides a challenge for having to work creatively within the limits of BASIC. Coming up with a reasonable BASIC alternative to a faster more complex M/L routine can be lots of fun too and equally rewarding.  Or sometimes not, and then one must simply learn to accept that the fun of an adventure can be simply the quest itself.  How Vedantic... your have a right to your labours, not the fruit of your labours Arjuna!

Sunday 9 September 2018

RetroChallenge 2018/09: Tour of the Castles

I've added color and some mechanics for entering and existing castles.


Keys next and then combat and bat stealing and moving stuff, items (randomly placed), bridge for going through walls and the microdot to unlock the secret easter egg. I'm thinking I will use something of the mechanic of the Fyrdracas (or whatever they're called) in my Dig Dug game for the Dragon attack in Adventure:


Instead of the original's mouth-open mouth-closed cycle, my dragons will occasionally breath fire at the character. You'll have to get your attacks in between those attacks. The Bat will simply fly in, and unless you can exit the screen quickly enough, it will hit you and fly off with any item you have and drop it somewhere randomly in the dungeon.

I think I will not have levels in my version. Instead, all items and monsters will start in random locations. Except maybe the key to the yellow castle, which will start somewhere close to the yellow castle. My sound and music will be pretty primitive, unless I can convince my son Charlie to send some help from his his home at Dalhousie university.


Saturday 8 September 2018

RetroChallenge 2018/09: Atari's Adventure on MC-10

Jerry Young on the MC-10 Facebook group page (I think, or maybe on the Yahoo group) suggested a while back that Atari's Adventure would be a great project for recreating on the MC-10 in BASIC because of the simplicity of its graphics and gameplay. His suggestion has been in the back of mind ever since, so I decided to try to get a variation working for this Autumn's RetroChallenge. I have the maps worked up and tested (somewhat). No combat or items yet. I will be posting updates here throughout the month. I'm hoping Jerry might be willing to come in on the project as a expert consultant on the Atari 2600 console and the game play of the original.


While wandering the net I found a post on Bjars.com and AtariAge about a game called Indenture, which is a DOS based Adventure game written by Craig Pell in 1995-1996 based on Adventure. The nice thing I noticed was that Pell had turned all the maps of the original into ASCII text listings in his source code. Looked a bit weird when I loaded it up into Wordpad:


Transferring it to Notepad and saving it as pure ASCII text cleaned it up. The rooms were formatted for an 40 column screen so I had to do some narrowing. Most of the vertical walls were two characters thick, so I just had to cut these in half. If I could do that 8 times I had a screen that would now fit on the MC-10. Then I just had to make sure that screens that attached were thinned in a similar way so that all connecting passages lined up.

Here's an example:

180 M=1:L=4:R=4:U=9:D=2
181 PRINT"??????? ? ? ?      ? ? ? ???????";
182 PRINT"?     ???????      ???????     ?";
183 PRINT"?     ???????      ???????     ?";
184 PRINT"?     ????????????????????     ?";
185 PRINT"?     ????????????????????     ?";
186 PRINT"?       ????????????????       ?";
187 PRINT"?       ????????????????       ?";
188 PRINT"?       ??????    ??????       ?";
189 PRINT"?       ??????    ??????       ?";
190 PRINT"?                              ?";
191 PRINT"?                              ?";
192 PRINT"????????????        ????????????";:RETURN

The source I borrowed from contained many additional rooms. Had to do some research to find out what rooms were needed for the original game. There are only 0-31, as far as I can determine, including the famous "easter egg" screen (and an apparently unused room 21). Then I had to compress the images by replacing common strings with variables. This brought the size of the program down quite a bit.

I should have lots of space now for adding some combat routines.  Not sure if I will slavishly follow the original, or try something a little different for combat. I'm thinking some kind of arrow shooting routine might be nice, rather than the simple sword thrust. The graphics for the characters will also probably be a little chunkier, but we'll see. At one point in the past I was thinking of these:


But with the maps I have, I think these images will be too large to be workable, but we'll see. I might just use something like these for the dragons and the bat (and sword or key):


I think I will use a simple block for the main character and possibly some ASCII text characters for items, such as a "Y" for the chalice. Not sure how I am going to handle the bridge or the "micro dot" that unlocks the easter egg.  So much to be done, such as adding color to the maps. Here's a vid of some simple testing of the maps:


Have a fun RetroChallenge everyone!