Skip to content

Instantly share code, notes, and snippets.

View lucatronica's full-sized avatar

Luca Harris lucatronica

View GitHub Profile
-- A note about faking toruses:
-- Spheres under projection become circles.
-- If we treat a torus like a chain of overlapping spheres, then we can draw
-- it using just circfill :)
::_::
cls(1)
-- The camera rotation angle.
q=t()/6
::_::
cls()
--Iterate 6 jellies. The 0th one will be invisible, but we need it for pal().
for n=0,6 do
--The x position of the Jelly.
x=n*288%112
--Scale of the jelly, from 0..1.
k=n/6
--The state of the vine is represented by x, y and a.
--x,y is the center of the base of the vine.
--a is the angle the vine is facing. It will always be a multiple of 1/4.
--(PICO-8 angles are 0..1)
--Each part of the vine is 10x10 pixels.
x=0
y=60
a=0
--We only need to clear the screen once.