A downloadable game

--- A is for Aardvark ---

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

Language: Commodore 64 Basic v2

Category: PUR-80


--- Description & Instructions ---

While wandering through the savannah, Kevin suddenly feels an appetite

building up. If he were a human being, then he would have had a serious

problem. Kevin, however, is not a human being but an aardvark. For him

the absence of a McDonald's franchise doesn't mean certain death from

starvation. Normally he would simply hurl out his tongue towards the

first ant or termite crossing his path, but not today. Under the

influence of narcotics Kevin's head has become detached from his body,

making it too hard to catch anything all by himself. This is where you

come in...

Press 'A' to let Kevin Aardvark know when to stick out his tongue.

Every time you catch an ant, Kevin's head floats to the right. Because

this is where the ants are coming from, your job becomes increasingly

harder. Every ant you miss will cost you a life, and you only have three

of those. After that, it's game over. But should you manage to catch 30

ants, then Kevin has had enough, and you will win the game!

Afterwards, press any key to play again.


--- Code Explanation ---

Line 0: Read the victory text, the string that holds the ant and the

        string that holds the aardvark from somewhere else in the code.

        Create a string that holds quotation marks.

        Use it twice to complete the ant string with feet.

        In a loop, create the vertical orientation string.

        Set the number of lives to 3.


Line 1: Set the background colour to brown.

        Set the length of the tongue to 0.

        Clear the screen, display the number of lives left and the number

        of ants eaten.

        Clear the boolean that tells whether an ant is at the tip of the

        tongue.

        Set the vertical position of the ant to the bottom of the screen.

        Set the horizontal position of the ant to the right of the

        screen.

        If all lives are spent, then jump to line 8.


Line 2: At random, decide the height of the aardvark.

        Display the aardvark.

        If 30 ants are eaten, then set the (otherwise empty) final text

        string to the victory text, and jump to line 8.


Line 3: Display the ant.

        If the ant is at the tip of the tongue, then don't change the

        horizontal position. Otherwise move to the left.

        If the ant is at the tip of the tongue, then move up. Otherwise

        don't change the vertical position.

        If the ant has reached the left of the screen, then 1 live is

        lost.


Line 4: If the sticking out of the tongue has started, then display it.

        Advance or retract the tongue.

        If the tongue has reached its limit then set that boolean. The

        displaying will now erase the tongue (retract).


Line 5: Read the keyboard.

        If 'A' was pressed and the sticking out of the tongue has not yet

        started, then start it.

        Set the direction of the tip of the tongue to down.

        The displaying will now show the tongue (advance).

        This line also contains data for the victory string.


Line 6: If the tongue has reached its limit (boolean was set), then clear

        that boolean.

        Set the direction of the tip of the tongue to up.

        Undo the most recent advancement of the tongue.

        If the screen position under the tip of the tongue was not clear,

        then the displaying will now show the tongue.

        Set the boolean that tells whether there is an ant at the tip of

        the tongue.

        Undo the most recent advancement of the ant.

        Increase the number of ants eaten.


Line 7: Don't change the horizontal position of the aardvark, unless the

        ant reaches the left side of the screen, then reset the

        horizontal position. Or if the ant disappears up the aardvark's

        snout, then move the aardvark to the right.

        If the ant has not reached the left side of the screen and has

        not disappeared up the aardvark's snout, then jump to line 3,

        otherwise jump to line 1.

        This line also contains data for the ant string.


Line 8: Display 'GAME OVER' and the final text string.

        Clear the keyboard buffer.

        Wait for a key to be pressed.

        Clear the keyboard buffer again, so that the last key pressed

        doesn't affect the new game.

        Restart the game.


Line 9: This line contains data for the aardvark string.

---

Download

Download
A is for Aardvark.d64 170 kB
Download
Commentary for A is for Aardvark.txt 5.3 kB

Install instructions

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

If you haven't installed it yet, it can be downloaded from their website.

Here's how to use it:

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

 Select: A is for Aardvark.d64

 Click : Attach

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

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

 LOAD"AARDVARK",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.

Comments

Log in with itch.io to leave a comment.

very good