Log In  


Cart #gyejateb-0 | 2024-09-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

A simple graphical demo for the PICO-1K Jam 2024 which creates an animated pattern similar to the spiral pattern that seeds in a sunflower make.

I'd played around with this in lockdown using Java libGDX and decided to port it to PICO-8 for the 1K jam.

You can use the left and right arrows to change the radius of the dots.

The compressed byte size of the cartridge is 312. I've made little effort to save bytes because the program is so simple in the first place.

-- sunflower
-- by retroredge,v0.1,2024

function _init()
  n=0
  f=0.618
  d=0.00002
  r=1
end

function _draw()
  cls()
  for i=1,n do
    local l=i/n
    local a=(3.14*f*i)	
    local x=(l*cos(a))*64
    local y=(l*sin(a))*64
    circfill((64)+x,(64)+y,r,c(i))		
  end
end

function _update()
  if (n<501) n+=1
  f=f+d
  if (btnp(⬅️) and r>0) r-=1
  if (btnp(➡️) and r<11) r+=1
end 

function c(i)
  if i%3==0 then
   return 10
  elseif i%5==0 then
   return 11
  elseif i%7==0 then
   return 8
  else
   return 12
  end
end
1



[Please log in to post a comment]