QuickBASIC programs

       Analog Dial             ROCKET         GALCON        Page 3        

also known as Galcon
This is a clone of the famous game by Rick Raddatz, written in QuickBASIC.

One of the best games I've ever played,  Andy (brother-in-law) and I would sometimes stay up till 4 AM playing "Galcon" in my basement. The actual name is GALCON24.EXE, written by Rick Raddatz. It's a game of domination, similar to "Risk" but  without borders, and without being able to see what your opponent is doing.

When you realize what he is up to, it is too late. Hundreds of your ships are decimated and your planet is lost. Or perhaps it is too late for your opponent as the wrecked hulls of his ships pile up. They die yet still they come, unable to be recalled, to meet with certain death. Certain death because of the strategy you used, anticipating where an attack may hit.

The speakers from the stereo in the living room were placed on the table in the basement, with the computer and monitor between them. With a case (or more) of beer next to us and most of the light bulbs in the ceiling unscrewed, we'd listen to "The Planets" by Gustav Holst as we carefully selected the "universe" in which we were about to battle each other. The music would then change to Genesis - every album ever made while Peter Gabriel was in the band (with the exception of "From Genesis to Revelation," which I didn't own). Sometimes Andy would bring a new CD with something different, and THEN the Genesis music would start.

There was just one problem. Occasionally a planet would revolt. We didn't like this aspect of the game. How would you like to be playing chess when suddenly a pawn changed to your opponent's color? We had a work around. We played on a Tandy TL-2 which booted to MS DOS in ROM. In other words, it didn't boot from the hard drive, so it would come to life almost instantly. At the end of every turn we'd save the game, and if there was a revolt we'd hit <CTRL> <ALT> <DELETE>, reboot and load the saved game back in.

There was much talk about the author, Rick Raddatz, while we were booting. He seemed to have disappeared. A letter to the address displayed at the end of the game went unanswered. We just wanted him to disable the revolts. We wondered what became of him. Was he even still alive?

Then one cold wintery night while setting up the game, one of us hit a wrong key.
On the screen were the words, "
Redo from start ."

We stared at the screen. We leaned closer. We looked at each other, then back at the screen. That phrase had meaning. We both rather simultaneously exclaimed, "Holy shit! Rick wrote this in QuickBASIC!!!"

With that eye opening message came the idea that perhaps the game could be cloned in QuickBASIC, without revolts.

The "Redo from start" message in GALCON24.EXE.

For demonstration purposes, "Mike" and "Andy" are playing a five turn game. You can always add more turns.
Our names were never Mike and Andy during a real game.

Andy is attacking Planet N

Andy invades Planet V

The situation at the end of the game

This doesn't look like much of a game in the pictures.
This needle with Heroin doesn't look like much in the picture either.
See what I'm sayin'?

I have not been able to derive how Rick Raddatz calculated the score but the way I did it gives a very realistic one.

In a real game you'd go after the entire universe and play about 40 turns or more. At some point you'd begin to attack each other, then the real battle starts. You'll each have thousands of ships. Taking your opponent's home planet will demoralize him.

Click to hear to your opponent as his home planet is taken.

At the end of the game is the splash screen from Andy's bulletin board. The Internet killed off the bulletin boards.

Right-click and "save as" to download the
QuickBASIC source code.
Right-click and "save as" to download the
text version (same as the .BAS version).
Right-click and "save as" to download
the  stand-alone executable version.
(Rename the extension to .EXE).
NOTE: This is "GalCon VER 10.8" dated January 2018. I will post newer versions when they become available.
One more thing, you DO NOT see your moves when you enter them. Otherwise, so would your opponent!

Right-click and "save as" to download GALCON24.EXE by Rick Raddatz.
Get DOSBox to play the EXE files. Click on the picture for the link.
Listen to Gustav Holst while you read the rest. Click on the picture. I've been listening while typing this!

A little about the QuickBASIC code and the game:  I started this in 1996. I'm not a programmer but I had written a few simple programs in GWBASIC and made some additions to the ROCKET program on the previous screen.

The code is written in such simple terms that someone with no knowledge of QuickBASIC can tell at least half of what is going on in the game by reading it. The only caveat is that if you're looking at it in Notepad or a web browser you'll see that QuickBASIC lists all the subroutines alphabetically.

For instance, the first subroutine listed is "SUB AddTurns," however, "AddTurns" wasn't the first subroutine written and it isn't used till near the end of the game. Just look for SUB <some name> and see if it makes sense. You'll encounter END SUB, then the next SUB will be listed, etc. etc.

The game wasn't written in any structured way; it was done piecemeal. The first version is just a rectangle with dots in it. This would become "the universe." The next version took 40 "planets" and arranged them randomly on the dots. The next version assigned a production and kill ratio to each planet. The next version had you enter your moves. This went on and on till there was what appeared to be a working Galcon screen. Except it didn't work.
An early version. The "planets" are randomly drawn on top of the dots and each one is checked to make sure
no two planets are in the same spot. Notice some of the planets are in lower case, and one is planet "up arrow."
The first major roadblock was how to move the "ships." Now don't get the idea that I was glued to the computer, pounding out code while guzzling Coca-Cola. I was glued to the computer, but I was pounding Yuengling Lager. It was more like, "It's Saturday night, I've dialed up all my favorite Bulletin Boards, and now I'm bored. I think I'll work on THE GAME."

I couldn't figure out how to move the ships, but I don't think the beer had anything to do with it. Or did it. At any rate, I stopped working on it for awhile.

In 1998 I found Rick Raddatz! The Internet was exploding and Rick had a website. There was no contact info on it. I sent an email to rick at raddatz dot com, just guessing that would be an obvious email address, and he wrote back!! I asked him to turn off the revolts and email me a new version of Galcon. He told me he wrote the game in 1988 while in college and the source code for the game was lost. He said that as DOS faded away he just deleted it to close a chapter in his life.

What??!! "Oh no you didn't!"  

According to Rick, The idea for Galcon came from a game named "Stellar Invasion," released in 1986 by Bearbyte Software, so he couldn't take credit for it.

Stellar Invasion circa 1986. More screen shots can be seen here.

At this time Rick worked for Microsoft. Go figure. Since the source code was gone, I asked him how to move the ships in the game. He wrote back, "It's quite easy. Here is the pseudocode:
mumbo jumbo
mumbo jumbo
mumbo jumbo
mTransports(mNumTransports).DistanceToGo = SQRT((X1-X2)^2 +(Y1-Y2)^2)
mumbo jumbo


I didn't have the slightest idea what he was talking about.

Then I came up with an ingenious way to move them myself. I would have them zigzag from the attacking planet to the attacked planet. The ships would move like this:

It worked! The subroutine TravelThroughSpace was written. It was two pages long and full of bugs! The ships would travel two "light years" per turn till they arrived at their destination. Another part of the program "remembered" the number of ships and what their kill ratio was.

Then the second roadblock was encountered. How do you make the ships fight each other? I made an AttackPlanet subroutine, but the ships with the higher kill ratio would just wipe out the ships with the lower kill ratio. That was not how the real game worked.

Now it was the year 2000. Microsoft killed off DOS, and a hundred thousand DOS programs would not run in Windows anymore. The program languished on my hard drive. I couldn't even run QuickBASIC to work on it.

In 2002, unbeknown to me, DOSBox was released. Here I was trying to make some text based game work and a REAL programmer wrote a DOS emulator that runs in Windows! The funny thing is that Bill Gates and Paul Allen, two of the richest men in the world, made their fortunes writing BASIC and MS-DOS, while DOSBox is free of charge.

In 2016, TWENTY YEARS after I started on the program I determined to figure out how to make the ships "fight" each other. After all, I had a working game, even if I no longer remembered how it worked.

It was kind of weird how the idea came. I was in work taking a break, staring out the 2nd floor loading dock door into the darkness while smoking a cigarette. Suddenly the solution seemed to be trying to come into my consciousness, already formulated, with no effort on my part to "figure" it out. It popped in and then out, like a dream you can't remember. I tried to think of what the idea was, then BAM! - it came back. I ran back to my desk and wrote it down.

That night, I edited the AttackPlanet subroutine. The game was complete. We could now play our clone of Galcon and not worry about revolts.

Obviously this was not how Rick Raddatz wrote the original version. That's why Rick worked for Microsoft and I didn't.

Well, after 20 years had passed we didn't play Galcon anymore. We keep saying we will but never do. With a working program that nobody would ever use, I went back to it in 2017 as a mental diversion.  I re-read Rick's emails from 1998. That equation he sent me looked very familiar. It turned out that his equation was actually this:

Rick used the Pythagorean Theorem to calculate the distance between two planets. He didn't have them zigzag to each other like I did in my TravelThroughSpace subroutine. I had to modify the calculation to get it to work, but it works very well. DistanceToGo = SQR((X2 - X1) ^ 2 + ((Y2 / 2) - (Y1 / 2)) ^ 2). Now the game "knows" how far apart the planets are as soon as you enter the moves. TravelThroughSpace was re-written and the ships "move" with just a single statement, DistanceToGo = DistanceToGo -2. Thanks Rick!

Mr. and Mrs. Rick Raddatz

Rick worked for Microsoft as a product developer from 1988 till 2000.
He then founded four multi-million dollar companies.
I found four dollars in a coat pocket.

This broadcast is now concluded. Tune in again tomorrow; same time, same channel.