arkivo.art

Genuary 2024 Day 4 - Pixels

Carson

-- genuary #4 2024 -- pixels -- by carson kompon o={} f=0 ?"\^!5f100⬇️3;⬅️⬇️" cols=4 poke(0x5f55,0) rectfill(0,0,128,128,0) poke(0x5f55,0x60) cy=0 function _update60() cls() add(o,{x=(t()*60)%128,y=0,h=rnd(.2)-.1,v=0,l=0}) for s in all(o)do s.v+=.1 local ly=s.y s.x+=s.h if(s.x<0)s.h=abs(s.h/2) s.y+=s.v if (s.y-ly)>1then local ny=s.y for i=ly,ny,0.25 do s.y=i check(s) end s.y=ny else check(s) end if s.y>=127 then s.y=127 place(s) end --[[ for h in all(o)do if h~=s then local dx=s.x-h.x local dy=s.y-h.y local d=sqrt(dx*dx+dy*dy) if d<5then local a=atan2(dx,dy)+rnd(.002)-.001 s.h=cos(a)*d/2 s.v=sin(a)*d/2 end end end ]]-- pset(s.x,s.y+cy,cols+1) end f+=1 if f%60==0then cy-=1 camera(0,cy) end if f%120==0then poke(0x5f55,0) palt(0,false) sspr(0,0,128,128,0,cy+1) palt(0,true) poke(0x5f55,0x60) end for i=1,20do sset(rnd(127),rnd(127),0) end sspr(0,0,128,128,0,cy) end function check(s) local xx=flr(s.x) local yy=flr(s.y) if sget(xx,yy)>0then local ops={0} if(sget(xx-1,yy)==0)add(ops,-1) if(sget(xx+1,yy)==0)add(ops,1) s.x+=rnd(ops) if sget(xx,yy)>0then s.y-=1 place(s) end end end function place(s) local c=1+rnd(min((140-s.y)/(128/cols/2),cols)) sset(s.x,s.y,c) del(o,s) end

Blockchain tezos
Smart Contract KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton
Platform HEN
Token ID 844017
Minted at 04 Jan 2024, 13:40 UTC

Metadata URI Metadata URI
Artifact URI Artifact URI

creativecoding , animated , pixelart , pixels , sand , opensource , genuary , pico8 , neoretro , pico-8 , lua , genuary4

JavaScript true
Networked false

Timestamp (UTC) 2024-08-17T06:06:51.973Z
Snapshot version 1
External network calls 0
Download Snapshot Download
Snapshot Image