A downloadable game

--- Rings Of Saturn ---

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

Language: Commodore 64 Basic v2

Category: PUR-80

--- Description & Instructions ---

Space Exploration can be a tricky business. Having finally reached

Saturn, you discover that this planet has more rings than previously

known. In order to continue your mission, you have no choice but to

manoeuvre straight through them.

Luckily your craft is equipped with a state-of-the-art 8-bit computer

system. (Well, it was state-of-the-art back in the eighties, when you

took off from earth...) With this ingenious device, dodging boulders of

various sizes will be no problem, right? Not quite. Due to code size 

limitations, that particular automated feature was never actually

implemented. So it's up to you to do this manually.

Every time you scrape you craft against a boulder, it loses some of its

shield power. To indicate this, it turns from green to yellow to orange

to red. When you run out of shield power, the game is over. But if you

manage to travel a thousand starmiles, you win!


Press '<' to move left.

Press '>' to move right.

--- Code Explanation ---

Line 0: Read the text strings of the boulders from elsewhere in the         

        code, and store them in an array for easy access. Also, read

        the text string that contains the encoded data for the

        spacecraft sprite.

        In a loop, decode this data and store it in memory.

        Set the shield power variable.

Line 1: Clear the screen and move a few lines down.

        Set background colour to black.

        Set a variable to the first register of the VIC-II chip.

        Access the sprite image data stored in memory.

        Turn on sprite number 1.

        Set the vertical position of this sprite.

        Set the horizontal position indicator variable.

Line 2: Pick a random number and use it to place a boulder on the screen

        at a certain horizontal position.

        Set a string variable with the victory text.

        Set a variable with encoded colour information.

Line 3: Start a loop depending on distance travelled.

        Use the keypressed variable to determine whether '<' or '>' was

        pressed, and adapt the horizontal position indicator variable.

Line 4: Set the Most Significant Bit of the sprite horizontal position,

        if necessary.

        Set the rest of the sprite horizontal position.

        Increase the distance travelled.

        When a thousand starmiles have been travelled, set the final text

        string to the victory text string.

Line 5: Move one line down.

        Read the keyboard.

        If the sprite collides with a character, decrease the shield

        power variable.

        This line also contains data for a text string.

Line 6: As long as there is shield power, set the colour of the sprite by

        decoding the colour information variable.

        Come out of the loop.

        Pick a random number to indicate which boulder image is displayed


        As long as the maximum distance hasn't been travelled, jump to

        line 2.

Line 7: Clear the screen and display "GAME OVER", the travelled distance

        and the final text string.

        Clear the keyboard buffer.

Line 8: Wait for a key to be pressed.

        This line also contains data for text strings.

Line 9: Restart the game.

        This line also contains data for a text string.


Rated 5.0 out of 5 stars
(1 total ratings)
AuthorBASIC 10Liner
Tags8-Bit, basic, basic10liner, commodore, Commodore 64


Commentary for Rings Of Saturn.txt 4 kB
Rings Of Saturn.d64 170 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: Rings Of Saturn.d64

 Click : Attach

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

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

 LOAD"RINGS OF SATURN",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.

Leave a comment

Log in with itch.io to leave a comment.