A downloadable game

--- No Fly Zone ---

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

Language: Commodore 64 Basic v2

Category: PUR-80


--- Description & Instructions ---

Up till now you had it fairly easy. Stationed in sector ZZ9 Plural Z

Alpha, your job mainly consisted in drinking coffee while watching

pitch-black computer screens monitoring open space. Sometimes you even

wondered whether they were switched on at all.

In times of peace, being a peace keeper for the United Galaxies can be

quite boring. Therefore you couldn't be more surprised, when suddenly all

alarms went off!

According to the message on your screen, one of the parties the UG tries

to keep from tearing each other apart has violated a ceasefire that has

lasted for millennia. Hordes of fly shaped military space craft are

heading through your sector to wage war.

It is your mission to intercept them before they reach their target. All

you have at your disposal is an outdated High Energy Lithium Laser (HELL)

system that fires one shot at a time. To make matters worse, you can only

take aim from your space station in four directions.

Use your joystick in port II to shoot DIAGONALLY at the flies, before

they reach the other side of the screen, or it's game over. With every

fly intercepted, new ones will appear increasingly sooner, making your

mission progressively harder.

Press any key to restart the game.


--- Code Explanation ---

line 0: Read data for the fly-string from elsewhere in the program.

        In a loop create a vertical orientation-string.

        Set character colour for the entire screen to green.

        Do this by clearing the screen and display the satellite.

Line 1: Set background colour to black.

        Create a string with quotation marks.

        Use this string twice to give the fly feet, immediately erasing

        the second pair upon display.

        Create a string that erases a fly upon interception.

        Prevent flashing of the topleft character.

        Set a variable with the improbability value.

        Set a variable to screen memory.

Line 2: In a loop process the activities of all four flies.

        The horizontal position of each fly is stored in an array.

        Use a variable with a short name to access these in order to

        reduce code size.

        If this position is larger than zero (meaning that the fly is

        activated) then display or erase the fly.

        If the fly was intercepted (and therefore erased) then stop

        the laser and reset the horizontal position.

Line 3: Set a variable with the values of joystick II.

        Set a variable with all directional joystick values.

        Calculate the horizontal direction of the laser using the

        horizontal joystick values.

        Calculate the vertical direction of the laser using the

        vertical joystick values.

        Use both of these directions to determine the appropriate

        laser character screen code.

        Reset the display-string to the fly-string.

Line 4: Move the fly forward if it was activated or decide using the

        improbability value whether to activate it or not.

        Override the laser character screen code with a neutral value

        if the joystick was untouched.

        Store the new horizontal value in the array.

        If the other side of the screen has been reached then jump

        to line 9.

Line 5: If a fly had been intercepted then increase the score.

        Clear the laser.

        If the firebutton is pressed, the joystick points in a

        direction and the laser is not yet fired then start the laser,

        using the calculated directions, screen code and start

        position.

Line 6: Clear the interception variable.

        Display the score in the topleft corner.

        If the laser was fired then move it forward.

        Display the laser.

        If the top or bottom has been reached then stop the laser.

Line 7: If the laser was fired and the position in front of it is not

        clear (you hit something) then set the display-string to the

        erasure-string.

        Manipulate the loop index so that in the next iteration the

        intercepted fly is processed.

        Set the interception variable.

Line 8: Display the body of the satellite using the inverted laser

        character screen code.

        Manipulate the loop index so that there can never be a fifth

        fly in the middle.

        Come out of the loop or iterate.

        Jump to line 2.

        This line also contains data for the fly-string.

Line 9: Display "GAME OVER" in the centre of the screen.

        Clear the keyboard buffer.

        Wait for a key to be pressed.

        Restart the game.

StatusReleased
Rating
Rated 4.0 out of 5 stars
(1 total ratings)
AuthorBASIC 10Liner
GenreAction
Tags10liner, 8-Bit, basic, commodore, Commodore 64

Download

Download
No Fly Zone.d64 170 kB
Download
Commentary for No Fly Zone.txt 6 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: No Fly Zone.d64

 Click : Attach

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

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

 LOAD"NO FLY ZONE",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: Settings -> Joystick settings -> Joystick settings...

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

Although this game would run perfectly well on a real Commodore 64, it is

a bit slow, due to the complexity of the code. In VICE this problem is

easily overcome:

 Click: Settings -> Maximum speed -> Custom

Now you can enter the speed as a percentage of the normal speed.

I recommend at least 250%, but of course you can set it to any speed you

feel comfortable with.

Comments

Log in with itch.io to leave a comment.

Greetings Sander Alsema,

we hope you doing great. I am Areeba Malik (aka Titania) from the BrewOtaku-Team, we are launching our first homebrew gaming magazine soon. We loved your work and we have mentioned your game "No Fly Zone” in our very first issue.

Please share your contact details if you would like to have a digital copy of our magazine. As we intend to sell the magazine at a very affordable price, you would need to keep it confidential for you only, of course you would get a free copy.

We look forward to hearing from you soon.

Kind regards

Areeba Malik (Titania)

Could use some sound effects if you care to update it after the contest.