A downloadable game

--- Zombie Menace ---

Written by Sander Alsema for the 10-liner competition 2026.


Language: Commodore 64 Basic v2

Category: PUR-80


--- Description ---

Graveyard shift at the cemetery. Brian O'Donnelly took a swig from his hip

flask. Nineteen years of loyal service to the force, and for what? It

seemed like everybody got ahead at some point, except for him. Yesterday

was a new low. A co-worker he had personally taken under his wing as a

rookie several years ago had been promoted, and was now his direct

supervisor.

Brian sighed. He still had over five hours to go till the end of his beat.

Here at the Rosehill burial ground nothing ever happened. Its residents

spent all of their time resting in peace. He didn't know it yet, but

things were about to change.

Somewhere in the distance an owl started hooting. This had a calming

effect on Brian, who helped himself to another sip. Then suddenly the owl

silenced in the middle of a hoot. What could have startled it? Brian

turned around. Nothing could have prepared him for what he saw next.

Increasing numbers of dead people were crawling from the dirt of their

graves. As soon as they were up, they began stumbling towards an

unsuspecting world.

This is where you intervene. Brian O'Donnelly is an alcoholic police

officer past his prime, and in no way capable of anything heroic. So it

is up to you to save mankind from the zombie menace.


--- Instructions ---

Use your joystick in port II to move Brian up and down. Press the fire

button to make him shoot his service pistol.

At first only a few zombies approach, but before you know it, the place

will be swarming with them. Every zombie you take out falls face down in

the mud. You need to take out one hundred of them to win. However, if

just one of them reaches your line of defence, you will lose.

Afterwards, press any keyboard key to play again.


--- Code Explanation ---

line 0: Make a string of the police officer. Notice the extra space

        character that erases muzzle flash.

        Make an intermediate string that erases three characters.

        Use the above mentioned string three times to build a string that

        erases a block of 3x3 characters.

        Make a mobility array to interpret joystick movements, 4 screen

        positions up or down.

Line 1: Build a string that erases a walking zombie and leaves an

        eliminated zombie, face down in the mud.

        Complete the earlier built string, so that it erases a block of

        3x4 characters.

        In a loop, build a vertical orientation string and initialize

        sound registers.

        Make sure the police officer string will be displayed first, by

        setting the string.

Line 2: Make a string of a walking zombie.

        Set the background colour to black.

        Clear the screen.

        Read the string with the victory text from somewhere else in the

        program.

        Set a variable with the memory address of the sound volume

        register.

        Turn on white noise for the gunfire sound.

Line 3: Use a loop to control up to 6 zombies.

        Display the amount of zombies eliminated and the police officer.

        (or erase him if he moved)

        If a motion was detected then move the officer up or down, clear

        the boolean that said it was, make sure the police officer

        will be displayed, by setting the string and perform this line

        again.

Line 4: Set the direction variable by feeding the joystick data in the

        mobility array.

        Clear the direction variable if necessary, to keep the police

        officer from going too high or too low.

        Transfer the horizontal position data of the current zombie from

        its array to a variable with a shorter name to save code space.

        Make sure the zombie's old position will be erased, by setting

        the string.

        Calculate the screen position of a possible muzzle flash.

        Set a boolean that says whether a new zombie should be

        displayed or not.

        If the directional variable is set then set a boolean that says

        so. Make sure the old police officer's position will be erased.

Line 5: Calculate a gunfire boolean for when the police officer is not

        moving, the gunfire volume has died down and the joystick button

        was pressed.

        Calculate a boolean to activate a zombie when the zombie was not

        already activated, a randomized decision to activate was made

        (partly depending on the score) and not all zombies in the game

        were activated yet.

        Use the above mentioned boolean to activate a zombie or not.

        Have all the zombies been eliminated? Then set the final text

        string, that would otherwise be left empty, to the victory

        text. Jump to line 9.

Line 6: Set a boolean that says whether a zombie survives or not.

        If a zombie was activated, then first delete its old position.

        To make sure that this line is only repeated once, clear the

        boolean that says whether a zombie should be displayed or not.

        Move the zombie three screen positions to the left.

        Make sure the zombie will be displayed, by setting the string.

        Return the altered horizontal position data of the zombie to its

        array.

        Perform this line again.

Line 7: To save space in the code, set a variable to the horizontal

        position data of the zombie that approaches at the same height

        as the police officer.

        If the gun is fired, then display muzzle flash and set sound

        volume to five. If there was a zombie approaching in the line of

        sight, then display it lying face down in the mud. Increase the

        score. Clear the boolean that says whether the zombie survived

        or not.

Line 8: Use the boolean that says whether a zombie survives or not, to

        determine whether its horizontal position data should be cleared

        or not.

        Set sound volume register.

        If the volume is greater than zero, then decrease it.

        Set a boolean that says whether all zombies where eliminated or

        not.

        If a zombie was recently activated, then increase the number of

        activated zombies in the game.

        Read the joystick data.

        If an approaching zombie has not yet reached the line of defence

        of the police officer, then continue with the next zombie. If

        this was the last zombie, then restart the loop with a jump to

        line 3.

Line 9: Switch the sound off.

        Display the 'GAME OVER' message, and possibly the victory text.

        Clear the keyboard buffer.

        Wait for a key to be pressed.

        Restart the game.

        This line also contains data for the victory text.

---

StatusReleased
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorBASIC 10Liner
GenreAction
Tags10liner, basic, Commodore 64

Download

Download
Zombie Menace.d64 170 kB
Download
Commentary for Zombie Menace.txt 7.9 kB

Install instructions

I prefer VICE, but you can use any emulator that works with *.d64 files.

If you haven't installed it yet, use a search engine to find the website

it is currently hosted on and download a version that works on your

system.

Here's how to use it once you got it running:

 Click : File -> Attach disk image -> Drive #8

 Find and select: Zombie Menace.d64

Now, just as you would with a normal Commodore 64, you can type:

 LOAD"$",8              (to load the directory)

 LOAD"ZOMBIE MENACE",8  (to load the game)

 LIST                   (to view the directory or game listing)

 RUN                    (to run the game)


Be aware that you are now using a virtual Commodore 64 keyboard.

Therefore the keys will differ slightly from your physical keyboard.

Use <SHIFT> '2' to display quotation marks.

To play this game you need a JOYSTICK IN PORT II. Here is how to set it

up in VICE:

 Click: Preferences -> Settings… -> Input devices -> joystick

You can now enter the keyboard button set you want to use as a joystick.

THIS GAME USES SOUNDS, so be sure to turn on your speakers!


Comments

Log in with itch.io to leave a comment.

Great concept, love the pistol sound! Past 50 it starts to get really intense!