Hi everyone,
A few years ago, I programmed the game “Asteroids”. I’m attaching it here:
ASTEROIDS.dsk (190,3 KB)
(run"Asteroid")
Screenshot:
Controls: Explained on the start screen.
- You can cheat in the game by allowing yourself more simultaneous shots on the start screen. Currently, it’s set to 3.
- Pressing the M key during the game toggles between Mode 0 and Mode 1.
Technical game structure (how it’s programmed)
-
It is a vector graphics game. You can see this best on your own spaceship in Mode 1. At certain angles, you can tell that the ship looks a bit strange. Here are a few screenshots / impressions of how I struggled with the rotation:
-
The asteroids and the spaceships are defined by their coordinates and rotated using “lookup tables for rotation”. That way, I don’t have to perform any divisions.
-
The maximum number of asteroids is hardcoded so the game doesn’t get too sluggish. That’s also the exact reason why I wrote the game “Sternenschwarm” (also shared here on the forum). I wanted to try my hand at achieving smooth gameplay.
This game is really just a proof of concept. It won’t be developed any further.


