Skip to content

Instantly share code, notes, and snippets.

@neauoire
Last active August 29, 2015 14:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neauoire/e8f189af4c8ab7743001 to your computer and use it in GitHub Desktop.
Save neauoire/e8f189af4c8ab7743001 to your computer and use it in GitHub Desktop.
Pico8 Tunnel
-- GEODEZIK
-- BY ALICEFFEKT
frame = 0
function _update()
frame += 1
-- loop at f127
if frame > 127 then
frame = 0
end
end
function _draw()
rectfill(0,0,127,127,0)
i = 0
while( i < 20) do
e = (i * 0.5)
line(0,(frame*e),127-(frame*e),0,7)
line((frame*e),127,0,(frame*e),7)
line(127,127-(frame*e),(frame*e),127,7)
line(127-(frame*e),0,127,127-(frame*e),7)
i += 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment