Skip to content

Voltmaze – My Third Entry into the 2026 BASIC10 Competition

For more than a decade, Gunnar Kannold has been hosting the BASIC10 Liner Competition

http://basic10liner.com/

The idea is simple, using BASIC on 8-Bit Home Computers from the early days, write a game, utility, or something interesting using up-to 10 Lines of code. There are several categories challenging people to write code with a maximum of 80, 120, 256 characters per line of code.

Final Submission was 22nd March 2026 so entries are now closed for this year with results being announced in April once the judging is complete.

There’s some amazing entries from the community this year, including a 10 Level Arkanoid game for the Atari in just 10 lines of code. Extremely impressive!

I don’t usually enter, but discovered someone submitted my Matrix in last years competition and apparently I came sixth in Schau category.

After some encouragement from my friend George Bachaelor (The Amstrad CPC is underrepresented), who many may know in the Retro community scene – check out his website https://blastannual.com.

I created three entries for the competition, Voltmaze, Pavement Panic and Knights Tour.

This is my third entry to the competition.

I hadn’t coded BASIC on this platform in a number of years, and a great reminder of how powerful Locomotive BASIC is, compared to other offerings in the 1980’s

This entry was inspired by the Atari 2600 game Maze Chase… simple, fast, and surprisingly tense. It got me wondering… could something like this be recreated in just 10 lines of BASIC?

If you want to play the game on your favourite Amstrad CPC Emulator, Type-It in or run on real hardware, you can download this entry here:

https://bunsen.itch.io/volt-maze-amstrad-cpc-by-muckypaws

The game features the following :-

  • Procedurally Random Generated Mazes using the Depth First Search Principle
  • Level Progression
    • Level 2, part of the maze blinks in and out of existence
    • Level 4, the entire maze blinks in and out of existence
    • Hunters may appear to steal your gold and health.
  • Electrified Walls..
    • Don’t bump into the walls, it will cost you your health.

The maze is generated using a depth-first search (DFS) algorithm, guaranteeing at least one valid path to the exit every time.

There’s a twist though… Locomotive BASIC doesn’t handle recursion particularly well, so instead of a traditional recursive approach, this uses a manual stack to drive the algorithm.

In other words… it’s effectively recursive logic, implemented without recursion, and squeezed into just 10 lines of BASIC.

As you might expect, maze generation and rendering are fairly slow at native speed. If you’re running this in an emulator, enabling turbo mode will speed things up considerably.

I use JavaCPC : https://sourceforge.net/projects/javacpc/ though this will work on real hardware, or other Amstrad CPC Emulators.

Here’s the game in action.

I also asked AI to generate a 1980s style cassette cover the game too… after all cassette artwork was more exciting than many of the games released back then. I know the use of AI is considered Slop by many, though I think this is a pretty good effort maintaining the style of the time period.

Retro cassette cover artwork for “Volt Maze” on the Amstrad CPC, featuring a glowing orange electrified maze, a small green player character, and a red robotic hunter, styled like a classic 1980s home computer game.
Volt Maze – a fast-paced electrified maze survival game written in 10 lines of BASIC for the Amstrad CPC.

Want to see the code? And yes… it really is just 10 lines:

1 CLS:MODE 1:BORDER 0:RANDOMIZE TIME:SPEED INK 250,12:INK 0,0:INK 1,2:INK 2,22:INK 3,2:DIM M(38,20),V(18,9),SX(200),SY(200),A(4),B(4):SC=0:HS=0:LV=0:HP=0

2 LV=LV+1:HP=5+LV*5:CLS:LOCATE 12,12:PEN 2:?"GENERATING...":INK 3,2+(LV>1)*2,2:INK 1,2+(LV>3)*2,2:FOR y=0 TO 20:FOR x=0 TO 38:M(x,y)=1:NEXT:NEXT:FOR y=0 TO 9:FOR x=0 TO 18:M(2*x+1,2*y+1)=0:V(x,y)=0:NEXT:NEXT:SP=1:SX(1)=0:SY(1)=9:V(0,9)=1

3 HP=HP+(HP-25)*(HP>25):IF SP=0 THEN M(37,0)=0:FOR j=1 TO 19 STEP 2:FOR i=1 TO 37 STEP 2:M(i,j)=2:NEXT:NEXT:CX=-(LV>3)*(1+2*INT(RND*19)):CY=-(LV>3)*(1+2*INT(RND*10)):GOTO 6

4 cx=SX(SP):cy=SY(SP):NC=0:FOR d=1 TO 4:dx=-(d=4)+(d=3):dy=-(d=2)+(d=1):nx=cx+dx:ny=cy+dy:IF nx>=0 THEN IF nx<=18 THEN IF ny>=0 THEN IF ny<=9 THEN IF V(nx,ny)=0 THEN NC=NC+1:A(NC)=nx:B(NC)=ny

5 NEXT d:IF NC=0 THEN SP=SP-1:GOTO 3 ELSE ri=INT(RND*NC)+1:nx=A(ri):ny=B(ri):M(cx+nx+1,cy+ny+1)=0:V(nx,ny)=1:SP=SP+1:SX(SP)=nx:SY(SP)=ny:GOTO 4

6 SPEED INK 12,250:CLS:FOR y=0 TO 20:FOR x=0 TO 38:PAPER -(M(x,y)=1)*(3-(LV<4)*2*(y<6 OR y>12)):LOCATE x+1,y+1:? CHR$(32-112*(M(x,y)=2));:NEXT x:NEXT y:PX=1:PY=19:PAPER 0:LOCATE 40,1:PEN 1:?"<";:LOCATE 1,23:PEN 2:?"SC:";SC;"  HI:";HS;"  LV:";LV;"  HP:";HP

7 LOCATE PX+1,PY+1:PEN 2:PAPER 0:? CHR$(248+((PX+PY)AND 3));:k$=INKEY$:dx=-(k$="p")+(k$="o"):dy=-(k$="d")+(k$="e"):IF dx=0 AND dy=0 THEN 7

8 IF M(PX+dx,PY+dy)=1 THEN HP=HP-1:BORDER 24:FOR t=1 TO 50:NEXT:BORDER 0:IF HP<1 THEN PEN 2:LOCATE 12,12:?"*** GAME OVER ***":FOR t=1 TO 2000:NEXT:SC=0:LV=0:GOTO 2 ELSE GOTO 10

9 LOCATE PX+1,PY+1:PAPER 0:?" ";:PX=PX+dx:PY=PY+dy:SC=SC-5*(M(PX,PY)=2):M(PX,PY)=0:HS=HS+(HS-SC)*(SC>HS):IF LV>3 THEN LOCATE CX+1,CY+1:PAPER 0:?" ";:M(CX,CY)=0:CX=1+2*INT(RND*19):CY=1+2*INT(RND*10):LOCATE CX+1,CY+1:PEN 2:? CHR$(225);

10 LOCATE PX+1,PY+1:PEN 2:PAPER 0:? CHR$(248+((PX+PY)AND 3));:LOCATE 1,23:?"SC:";SC;"  HI:";HS;"  LV:";LV;"  HP:";HP:HT=(LV>3)*(CX=PX)*(CY=PY):HP=HP+HT:BORDER-HT*24:IF PX=37 AND PY=0 THEN ?"LEVEL UP!":SC=SC+HP*5:FOR t=1 TO 400:NEXT:GOTO 2 ELSE GOTO 7

It’s always surprising how much you can squeeze out of these old machines with a bit of creativity… and a lot of stubbornness.

Win or lose, this was a fun one to build… and a reminder that limitations often make things more interesting.

If you want to learn more about the design of the code, all artefacts are available from https://bunsen.itch.io/volt-maze-amstrad-cpc-by-muckypaws

Let’s see how it does in April.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.