Saturday, 20 May 2017

ZX Spectrum BASIC Challenges

Recently I've entered a few of the programming challenges in the BASIC on the ZX Spectrum group on Facebook. They vary in difficultly but it's possible to write a program for most in under 30 minutes. If you're looking for a quick challenge or the opportunity to improve you BASIC, why not take a look.

Here are some examples of the challenges:

Japanese Pattern

Uwe Geiken asked us to recreate an intricate Japanese pattern. By mirroring, rotating and repeating a 4 line candy cane shape I squeezed this into 156 bytes.

Earth/Venus Orbits

David Saphier challenged us to write the fastest code to display the Earth and Venus orbit pattern in BASIC. Being a bit of a rebel I aimed to write the shortest code and managed to completely botch it before coming up with this working version:

Greenlandic Flag

Matthew Logue issued a challenge to accurately display the flag of Greenland. The flag is simple enough to be reduced to a formula x²+y² < 54² ⊻ y > 0:


Uke Geiken showed a pattern of triangles and asked for the shortest code. The shortest implementation I found uses UDGs:


Matthew Logue asked us recreate a grid-like pattern with the shortest code. Surprisingly I actually managed to discover the smallest program:


‎Uwe Geiken challenged us to recreate a pattern of weaving attributes. I found this one pretty tricky to reduce in size, but finally got it down to 109 bytes:


Matthew Logue asked for the shortest code to recreate a 31×21 attribute flag-like pattern. Uwe Geiken solved this is 67 bytes, easily beating my 74:

Rudimentary Gear

Matthew Logue challenged us again, this time to draw a rudimentary gear with 10 teeth and a circular radius. Here's what I came up with:


  1. Why is Sinclair Basic so SLOW?

    1. Beaceaue CPU power first goes to s.c. interpreter which "translates" simple BASIC command to machine code ( assembler ) ands THEN executes the code. Beceause Zx Spectrum BASIC is also armed with many commands with complex syntax - it takes a lot of CPU power

  2. Great post programming difficulties in the BASIC on the ZX Spectrum bunch on Facebook. They change in troublesomely however it's conceivable to compose a program for most in less than 30 minutes. In case you're searching for a fast test or the chance to improve you BASIC, why not investigate. the Earth and Venus circle design in BASIC.i hope my reply is helpful you I'm working here Cheap Essay Writing Service Being somewhat of a radical I intended to compose the most brief code and figured out how to totally mess up it before thinking of this working form.

  3. Dentistry Research Paper Writing Services have come up with Dentistry Writing Services for dentistry coursework writing service students in order for them to score straight A’s in their dentistry paper writing services.

  4. Your skill is great. I am so grateful that I am able to do a lot of work thanks to your technology.토토사이트 I hope you keep improving this technology.

  5. The UX best firms project management team was professional and very organized throughout the process.
    UX design firms

  6. We have a site for sports games. 토토사이트 You must be interested. 먹튀사이트