ASTEROID
Written by Johan Berntsson, 5 February 2020

This is a game written in Commodore 64 Basic. It was entered
into the PUR-80 category of the Basic 10Liner Contest 2020:
https://gkanold.wixsite.com/homeputerium/2020

The game features complete gameplay, a sprite, side scrolling, colour, and
sounds effects.

INSTRUCTIONS
------------
In Asteroid you fly a spaceship in a side-scrolling screen
where asteroids appear. If you hit an asteroid your ship
is destroyed. As you get deeper into the asteroid field 
more and more asteroids appear. How far can you get?

The spaceship is controlled with the k and m keys.
You can shoot asteroids with the z key, but you have
a very limited supply of bullets, so don't waste them.

EMULATION
---------
The game should work well in pretty much any Commodore
64 emulator. I recommend Vice, since it has been tested
on Vice during development. Please make sure you have
sound enabled.

1. Start Vice.
2. Attach disk image breakout.d64 to device 8.
3. Type: load"asteroid",8 <Enter>
4. Type: run <Enter>

When the game ends, you can type "run" and press Enter
to play again.

With hardware support it is also possible to use the
d64 file to either load directly from a real Commodore 64,
or to convert the d64 to a real floppy and use it in the
Commodore 64.

SOURCE CODE
-----------
The main code is breakout.txt which contains
comments, and allows the basic lines to be split
across multiple source lines

The make script uses Unix utilities (tr, sed) to strip
the comments and merge lines from asteroid.txt to produce
a basic source file. This source file is compiled to a
C64 basic program using the petcat utility from the
Vice emulator. petcat is also used to produce a stripped
basic listing in asteroid.bas, which is the same as the one
seen in the C64 (with control codes expanded to text i
equivalents like those used in type-in listings in
Compute!'s Gazette and similar magazines in the 80's).
The script then launches the program using x64, the
Commodore 64 emulator also from the Vice package.

Feel free to use my make script for your own projects,
and modify it as needed.

Have fun!

