Bubbly (Sinclair QL) by Stephen Poole
A downloadable tool
PUR80 – Bubbly_bas demo by Stephen Poole, (QL Forum).
Code written and tested on QPC2 (QL emulator).
_________________
The original QL possessed two microdrive tape readers. These are now hard to find. Floppy disc readers could be installed, but are now rare. MSDOS and QDOS discs are formatted differently, but both types can be accessed by the ‘QPC2’ QL emulator. With this readme file, comes a program file which QPC2 will run.
But the simplest way to access the files is to UNZIP and copy them to a USB key, (which will be referred to by QPC2 as dos2_ ).
_________________
On PCs : Download QPC2 from its website onto your PC. Unzip, then click on the QPC2 appfile. Set ‘resolution’ to 512x256 and hit ok.
_________________
Watch until the animation halts. OR hit ESCape key.
___________________
1 WINDOW 512,256,0,0:SCALE 100,-50,-25:PAPER 0:CLS:n=RND(13 TO 28):FOR L=1 TO 9 2 DIM t(n),p(n):m=n*5:a=359:o=RND(-25 TO 55):q=RND(-25 TO 50) 3 FOR i=1 TO n:t(i)=RND(a):p(i)=RND(n^.5):END FOR i:x=0:FOR i=1 TO n*4 STEP .4 4 w=i/m:c=0:v=.3:s=-.6: u=96:BEEP 1638,i,i*8,1,i*RND+i,0,7 5 FOR k=1 TO n:v=v+.1:c=c+1:IF c=8:c=0:END IF :IF p(k)>0:x=1:INK 0:B i*v,t(k)*w 6 IF x=0:NEXT L:END IF :FOR d=1 TO n:t(d)=t(d)+RND(-3 TO 3):IF RND(u)=0:p(d)=0 7 h:LINE -50,q-5 TO 150,q-5:h:PAUSE 2:CLS:END FOR i:END FOR L 8 DEFine PROCedure B(m,g):LINE o,q-3:PENUP:TURNTO g:MOVE m:PENDOWN:E 1,0:E 2,s 9 DEFine PROCedure E(r,p):INK c,RND(7),r:CIRCLE_R 0,0,(g/20)-p 10 DEFine PROCedure h:INK 2,1,3:CIRCLE o,q,5;o,q-3,1;o-2,q,1;o+2,q,1:LINE o,q-29
Program description :
1 Full window : vertical scale : black paper : blackout : n number of bubbles :
L blow nine times
2 t & p Dimension of arrays for azimuth & popped : m bubble dispacement :
a all angles : o initially across : initially down
3 i loop randomise angle & popped : x erased ? : (End i)
i loop bubble-blowing loop
4 w modify bubble azimuth : c black ink : v modify bubble distance : s jiggle it
u odds of 1/96 to pop : Beep warble merrily
5 k fly bubbles : v move away : c change colour : if c=8 black ink : Draw Buuble
if bubble not popped x draw-flag : erase old position with black ink
6 if not popped abort : For all remaing bubbles : jiggle the t across position :
if unlucky popit : (END for remaning ones)
7 h Draw head : LINE draw wall : erase : Pause : Black screen : Next buubles
Next blowing
8 B prepare bubble : Set center : penup : azimuth : distance : pendown : Doublem
9 E ball : irridescent colour : draw it
10 h head : blueish—red : draw face, eyes, mouth : reset circle slightly
________________________
This program was rapidly written at short notice, using a few of the QL’s built in features.
___________________________
Any time the program halts, just type in RUN and hit ENTER.
____________________________
| Status | Released |
| Category | Tool |
| Author | BASIC 10Liner |
| Tags | 10liner, basic, sinclair, sinclairql |
| Content | No generative AI was used |

Leave a comment
Log in with itch.io to leave a comment.