Coin Droid by Sander Alsema
A downloadable game
--- Coin Droid ---
Written by Sander Alsema for the 10-liner competition 2021.
Language: Commodore 64 Basic v2
--- Description & Instructions ---
In the distant future, well after the cryptocurrency era, people have
rediscovered the value of physical money. Coins made of a variety of metals
have found a home in the hearts and minds of the general public. Banks are
still the institutes first associated with financial activities of course,
and The First Planetary Bank is no exception.
This is where Marvin is employed. He is only a 17th class android, but he
is ambitious. Besides electronic sheep, he dreams of one day becoming a 1st
class android. You can help him achieve this. Using a special branch, found
in a nearby forest one day, jab the various coins in the correct deposit
boxes, as they fall from the ceiling.
Every time you sort a coin correctly, you class rating increases. Besides
that, Marvin moves up one position, making it harder to sort the next coin.
However, if you make one mistake or if you have reached 1st class status,
then you are finished and get an evaluation.
To use the stick, press:
- "S" to jab softly.
- "H" to jab hard.
The main objective of the game is to achieve a 1st class rating, by sorting
the coins correctly. Their value is of no importance to you, since the
money belongs to the bank and not to you. Should you be interested,
however, here is what their worth:
- A bronze coin only has sentimental value.
- A silver coin is worth 10 Ningis.
- A golden coin is worth 20 Ningis.
Consult your copy of The HitchHiker's Guide To The Galaxy to learn their
current exchange rate.
--- Code Explanation ---
Line 0: Read data for the following strings: falling down coin, moving to
the right coin, the colours brown, light grey and yellow, top part
of the android, bottom part of the android, jabbing stick, coin
deposit boxes and class rating text.
Make a string with quotation marks.
Build the final android string with both part strings and the
quotation marks string.
Line 1: In a loop, create the partial background string which also doubles
as a vertical orientation string.
Also in this loop, create the android arm string.
Complete the background string with the coin deposit boxes string.
Complete the arm string with the jabbing stick string.
Set a variable for the android height/class.
Set a variable for the android arm length.
Line 2: Clear the screen, display loose change amount, the background
and the android,
Set a variable for the vertical position of the coin.
Set a variable for the horizontal position of the coin.
Set a variable with a random value that represents the colour of
Line 3: Display the arm and the falling coin.
Line 4: If the falling coin has reached the altitude of the arm and the
arm is stretched, then animate the coin moving to the right, above
one of the other deposit boxes.
This line also contains data for the falling coin string.
Line 5: Set background colour to black.
This line also contains data for the following strings: Moving
to the right coin, the colours brown, light grey and yellow and
the top part of the android.
Line 6: Read the keyboard.
If the key pressed was "S" or "H" and the arm is retracted, then
stretch the arm and set a variable with the horizontal position
of the second deposit box. If the key pressed was "H", then set
this variable with the horizontal position of the third deposit
Line 7: Let the coin drop one position.
If the bottom of the screen has not yet been reached, then jump
to line 3.
This line also contains data for the following strings: bottom
part of the android, jabbing stick, coin deposit boxes.
Line 8: If the coin has fallen in the correct deposit box, then adjust the
loose change amount and increase the android height/class. If the
android has not yet reached the top of the screen, then jump to
This line also contains data for the class rating text string.
Line 9: Clear the screen, display loose change amount and the class rating.
Wait for a key to be pressed.
Restart the game.
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: Coin Droid.d64
Click : Attach
Now, just as you would with a normal Commodore 64, you can type:
LOAD"$",8 (to load the directory)
LOAD"COIN DROID",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.
- Image downloadApr 08, 2021
Leave a comment
Log in with itch.io to leave a comment.