This time a minimalist version of the well-known game Breakout. I set myself the goal to see whether it is possible to make this in a maximum of ten lines Commodore Basic. Of course, it will not be a full version just a nice try. I wanted to have several minimal game elements in it such as:

  • Colour bars
  • A bouncing ball
  • A paddle to bounce the ball
  • Something for keeping score

It is precisely with these components that I have built up the program step by step. Below first the long version with comments and not shortened commands so that it remains readable.

Then the shortened version to 10 (oops still 11) lines. Although I do get to 10 lines if I were to use the PetscII characters, but I haven’t used them here to keep typing and readability simple.

To move the paddle the key “1” (left) en “2) right can be used.

And here is the shortened version of it. Only 10 mmm almost 11 lines of Commodore 64 Basic code.
It is possible to bring it to 10 lines if you replace the chr$ code by the PetscII characters. However to still have some readability i left it like this, as this makes it also easy to copy and use in the Emulator like Vice.



No responses yet

Geef een antwoord

Het e-mailadres wordt niet gepubliceerd.