Rings of Saturn (C64) by Sander Alsema

Add to
My games
Add to
Wishlist
Save to
Collection
No reviews
Exceptional
Meh
Skip

About

--- 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!

Controls:

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

        next.

        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.

---

Platforms
Genre
Release date
Developer
BASIC 10Liner
Age rating
Not rated

System requirements for PC

Read more...
Edit the game info
Last Modified: Mar 13, 2023

Where to buy

itch.io