Petri Dish

Uses the PICO-8 math library.

pico8-demo-3.gif
#include ./math.lua

world = {}

function _init()
  for i=1,256 do
    add(world, vec2(rnd(),rnd()):mul(128))
  end
end

function _update60()
  for e in all(world) do
    e:add(rnd()-0.5,rnd()-0.5):clamp(1,126)
  end
end

function _draw()
  cls(0)

  circfill(64,64,48,5)

  for e in all(world) do
    local x,y = e:unpack()
    pset(x,y,0)
  end
end

Date: 2024-04-08 Mon 08:01

Author: Alexandre Rousseau

Created: 2024-05-27 Mon 22:28

Validate