New Release: Moon Patrol

Discussion, Reviews & High-scores

Moderator: Moderators

Post Reply
User avatar
Mike
Herr VC
Posts: 4832
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

New Release: Moon Patrol

Post by Mike »

"New" Release. :wink:

Image

MOON PATROL, VIC-20 version written 1986, 1995 by Michael Kircher

Aim of the game:
... patrol the Moon, and return to the base.
But beware of craters, meteors, and UFOs ...

Controls:

Code: Select all

Joystick left:  decelerates Moon buggy
         right: accelerates Moon buggy
         up:    jump
         fire:  fires rocket upwards
System requirements: Runs on unexpanded VIC-20

Comments:

In 1986 I wrote the first version of it. I was't aware then, that a cartridge port already existed. Some years later in 1995 I picked up the code again, and decided it could need a good rework.

Cheers,

Michael
Last edited by Mike on Thu Feb 20, 2014 4:09 pm, edited 3 times in total.
User avatar
Kweepa
Vic 20 Scientist
Posts: 1314
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Wow, it's certainly challenging!
Does it have a story like Quikman?
User avatar
Mike
Herr VC
Posts: 4832
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Yep, there's a story. :)

Before Moon Patrol, I already had written some other small games, that used user-defined characters.

I found out about UDG's in the type-in listings of programs in computer magazines, like "CPU", "Compute mit", and "RUN" (the last of which should also be known in non-German countries).

As I already said, I didn't know about the cartridge port of Moon Patrol by Atari Soft, released in 1983. Games for the VIC were already hard to come by in 1986, with the C64 taking over the market. I knew the arcade version very well, and I simply wanted to play it on the VIC.

In the spring of 1986 I stumbled upon multi-colour characters. One thing, that practically never had been used in those type-ins I knew of. Multiple colours within one char, a revelation to me! But at first I had a hard time finding out how to define them correctly. Colour 0 - obviously - was the same as the background, colour 1 incidentally was the same as the exterior border colour, colour 2 was defined by the low 3 bits of colour RAM, but colour 3 somehow always remained - black. I tried writing in various registers of VIC, but only after I lend out a reference manual from a friend I saw, that colour 3 was defined by the upper 4 bits of the volume register.

Before that, I wrote a test-game named "HELI RESCUE", where you had to fly through a labyrinth cavern, to rescue a person trapped in the cavern. The frame of the helicopter was red, its screen windows cyan, the rotor was black. But for a game with black background, colour 3 needed to be changed, and now I had the solution.

Freshly equipped with that knowledge about colour 3, I began designing the graphics for Moon Patrol, on squared paper, then transferring it to DATA lines. Normally, one would reserve the last 512 bytes of BASIC memory - I would only need 24 chars, so I just reserved 256 bytes, still with room for 8 additional characters. Aside: the SPACE character was located quite at the beginning of my UDG's. And there's also the reverse character trick, which accesses the normal character set.

I developed the main program on the screen editor, and there were seldom more than 6 lines of the program visible on screen. That lead to the task of designing a prototype with few lines, which would then be expanded by using a knapsack (now we enter the dark caverns ...)

At first I wrote the joystick read routine, together with a scrolling routine for the ground. That one was done with the 'MID$(...,2)+Char' trick, printing out the resulting string always at the same place. Then I added the parallax scrolling mountains in the background.

The addition of craters, and the meteor (which was moved with POKE) required a collision detection, a jump routine for the buggy, score display, and a effect-routine for the explosion (if you didn't react).

Then came the UFO. It would only fly in a straight line over the screen, so the only danger (for both opponents) were rockets, shot up, and down. In 1986 I weren't able to combine this into the rest of the program properly, so the game stopped while shooting the rockets. Which made it mainly luck, which side would strike first. I completed the game with the ending sequence, where the buggy happily reaches the Moon base, and decorated the sky with stars.

I copied the game on tape for some friends, but I doubt these copies survived.

In September 1986 I got a C128, so I did little more with the VIC. Also, the PSU of the VIC fried, and I put the VIC dormant for 9 years in the desk. During that time, Moon Patrol hibernated on a tape as well.

(... enter the light at the end of the cavern):

In the summer of 1995, I found another working VIC on the flea market. I had thought all the time, that my first VIC was broken. Just for fun I also tried the new PSU with the first VIC, and it worked! A good friend of mine reminded me of Moon Patrol, so I did the following: I started up my then current computer (an Acorn Archimedes A5000), the VIC, and loaded in Moon Patrol. Then every line of the two parts (character definition, and main program) was transferred by eye, and keyboard to the A5000. But I needed to switch off thinking about what I was copying here.

Because, when I had done the transfer, I made a close inspection - and was about right: This had been the worst spaghetti code one could imagine! :)

Seeing this mess, I sat down on the A5000, and tore the program to pieces. With a good text editor on my hands, I identified the small pieces that made all the effects, and restructured them to a new implementation, aiming at moving everything simultanously.

Here's the result.
Last edited by Mike on Thu Jun 25, 2009 9:35 am, edited 1 time in total.
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

I love it, but I had trouble with seeing the holes in the road. A wanted them to be more pronounced, so they wouldn't sneak up on me. Very smooth animation.

Image
High Scores, Links, and Jeff's Basic Games page.
User avatar
Mike
Herr VC
Posts: 4832
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

That's indeed a particularily nice constellation of craters. Here you can apply at least two distinct techniques: The double-jump, or the wide-jump. :)
Royas
Vic 20 Amateur
Posts: 66
Joined: Fri Jan 30, 2009 6:22 pm

Post by Royas »

Mike wrote:That's indeed a particularily nice constellation of craters. Here you can apply at least two distinct techniques: The double-jump, or the wide-jump. :)
Or the "#@^&%@# CRAP I DIED" technique
User avatar
Spectrum
Vic 20 Hobbyist
Posts: 113
Joined: Wed Oct 12, 2011 10:15 am
Website: https://www.facebook.com/honeyvenom666/
Location: Rome, Italy
Occupation: comic artist

Post by Spectrum »

Very interesting story indeed!
I love this kind of memories. Thanks for sharing. :)
User avatar
Mike
Herr VC
Posts: 4832
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Hi!
Spectrum wrote:I love this kind of memories.
Well, it's a much condensed write-up of a game development, that then took several weeks to take shape, until the presumed failure of my VIC-20 put an unexpected end to my programming ambitions there.

When I picked the game up again in 1995, there were still no mature emulators around, so the only way to test the rewritten version was to re-type it again into my resurrected VIC-20 - just to enjoy the game for an hour or so, ... I didn't bother to save the game on tape again. But I kept the listing in text form (ASCII with all the special characters quoted, much as petcat does).

Around early 2002, I found out that VICE just had become a reasonable platform to run programs for the VIC-20. And since 2004, I'm writing here in Denial, and happy that there are still people around who share their interest in the VIC-20. :D

Greetings,

Michael
User avatar
Spectrum
Vic 20 Hobbyist
Posts: 113
Joined: Wed Oct 12, 2011 10:15 am
Website: https://www.facebook.com/honeyvenom666/
Location: Rome, Italy
Occupation: comic artist

Post by Spectrum »

Hi Mike!!!

Thank you very much for your explanation and replies. :D

Now I wanna try your Moon Patrol as soon as possible. And this means tonight. I can't play it on the real Vic yet (but I'm working to change this situation resurrecting my Vic) so I will run it on VICE.

I will let you know my impressions!

Keep up the good job!
User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Post by Witzo »

100 points! I have a hard time estimating how far I will fly at a certain speed.
User avatar
Mike
Herr VC
Posts: 4832
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

... it becomes even more fun, when UFOs appears in level 2 and you also have to evade their shots. ;)

The routine performing the jump is timed out, so if you jump upwards (without going left/right to change speed) right before a meteorite or crater, you'll land with your full length behind the obstacle. If the meteorite overlaps with either the front or back part of your moon buggy, or there's a crater below the front part, you lose one of your three lives. Maximum jump distance (going diagonally up/right) is up to 5 craters in a row. Subsequent rounds are ramped up in difficulty by increasing the probability of craters.
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Very nice story and game, thanks Mike.
Mega-Cart: the cartridge you plug in once and for all.
Post Reply