Created
September 4, 2019 20:48
-
-
Save rostok/17f44fa3e6b18087b0cae79948e1e4c9 to your computer and use it in GitHub Desktop.
Initial version of "Evening summer breeze" tweetcart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pico-8 cartridge // http://www.pico-8.com | |
version 16 | |
__lua__ | |
-- make it 400 bytes long | |
k={1,2,4,8,9,10,7} | |
-- k={9,9,9,9,10,10,7} | |
-- k={0,5,6,7,15,14,8,2,4,9,10,11,3,12,13} | |
-- k={0,0,0,0,0,1,1,1,1,12,12,7} | |
-- k={5,6,15,9,7} | |
s=sin | |
-- s=sin2 | |
function cl(x,y,z) | |
a = 0 | |
f = .006 | |
g = .006 | |
n = 1 | |
c = 2 | |
for i=1,n do | |
f+=f | |
g+=g | |
c*=.7 | |
p=s(g*y/2)/2+s(f*z/2) | |
a+=c*(s(f*x+p)+s(g*y+s(g*x/2)/4)) | |
-- b+=c+c | |
end | |
return a | |
-- a=(1-abs(a/3))*#k | |
-- return flr(a+1) | |
end | |
t=0 | |
::_:: | |
cls() | |
t+=1.5 | |
b=16 | |
srand() | |
for hh=0,0 do | |
for h=0,512 do | |
x=rnd(127+8)-4 | |
-- y=rnd(127+8)-4 | |
y=h*.26 | |
-- for y=0,127,b do | |
-- for x=0,127,b do | |
c=cl(x+t,y,0) | |
ca=c | |
c=(c+3)/6 | |
-- c=flr(1+(c+6)/12*#k) | |
-- c=flr(1+c*#k) | |
-- c=k[c] | |
cc=k[flr(1+c*#k)] | |
-- pset(x,y,cc) | |
line(x,y,x-ca/4*b,y-b,cc) | |
line(x+1,y,x-ca/4*b,y-b) | |
line(x+1+ca/8,y,x-ca/4*b,y-b) | |
-- line(x+1,y,x-ca/4*b,y-b*3) | |
-- line(x,y,x+cos(ca/8)*b/1.4,y+sin(ca/8)*b/1.4) | |
-- ? c,x,y | |
-- line(x,y,x-ca*4,y-b*c*2) | |
-- b=c*2+1 | |
end | |
end | |
flip() | |
goto _ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment