Bubble Universe

I ported the lua version of Bubble Universe (Thank you, @maple) almost directly to Basic Compiler Machikania.

rem over clock_366MHz
system 51,14
system 50,366000000

usevar stp
w=320:n=150
stp=2
r#=PI#*2.0/float#(n)
x#=0:y#=0
t#=0
u#=0:v#=0

cls
while inkey()=0
  rem wait 3
  cls
  for i=0 to n-1 step stp
    for c=0 to n-1 step stp
      u#=sin#(float#(i)+y#)+sin#(r#*float#(i)+x#)
      v#=cos#(float#(i)+y#)+cos#(r#*float#(i)+x#)
      x#=u#+t#
      y#=v#
      palette 255,255*i/n,255*c/n,168
      pset int(u#*float#(n)/2)+w/2, int(y#*float#(n)/2)+w/2, 255
    next
  next
  t#=t#+0.1
wend

These are the results at normal speed and overclocked (366MHz).
SPI also overclocked( system 58,100000000 )

3 Likes