Monday 20 April 2020

Game # 9: Asteroids

Didn't do anything yesterday, but a bit more coding this morning has lots of asteroids flying round the screen.

Quite pleased with this integrated FORTH compiler. It's a bit odd to get used to, but it works quite well. This is still only about 10 lines or so.

It will actually go faster than this (there's a line if event(e.move,6) then ...  which fires every 6/100 of a second) and the large asteroids are moving max 1 pixel per frame. You could say every 6,0 call move.everything() as well.

(The ship is wiped out because it's not redrawn in the main move cycle. The drawing works by writing and erasing bitmaps in black and white in a sprite fashion (e.g. only writing the pixels that are on) but when an asteroid is erased to move it takes the ship with it)

No comments:

Post a Comment

Breaking change

We all make mistakes. One early mistake I made was copying (partly) the old thing in Microsoft BASIC where you didn't have to declare ...