arkivo.art

Memory City

aebrer - Andrew Brereton

press and hold the circle button to dissolve the city Tweetcart Sourcecode (266 Characters): poke(▒|▤,웃/●)memset(81-😐,170,8)s=●-웃 pal({0,0,-15,1,-4,12,13,12,-4,1,-15,1,-4,1,-15},1)pal({-15,1,-4,1,-15,1,-4,12,13,12,-4,1,-15,0,0},2)cls()r=rnd::_:: x=r(128)y=r(16)+56pset(x,y,r(16))d=r(8191)poke(s+d-tonum(btn(4))*0.5,@(s+d-64*(mid(1,(r()-.5)/0)*2-1))) goto _ Explanation: -- instruct the pico8 to use the second palette, for the top half of the screen only poke(▒|▤,웃/●) memset(81-😐,170,8) -- save space by encoding the memory address for the display s=●-웃 -- set both palette one and two pal({0,0,-15,1,-4,12,13,12,-4,1,-15,1,-4,1,-15},1) pal({-15,1,-4,1,-15,1,-4,12,13,12,-4,1,-15,0,0},2) -- clear the screen cls() -- save characters when calling rnd r=rnd -- mark the start of the draw loop ::_:: -- random position for x x=r(128) -- random position for y within narrow band y=r(16)+56 -- draw pixel of random color at that position pset(x,y,r(16)) -- choose a position in the display memory d=r(8191) -- the part that makes the "city" poke( s+d-tonum(btn(4))*0.5, -- write to this position, if the button is pressed shift by -0.5 @(s+d-64*(mid(1,(r()-.5)/0)*2-1)) -- peek @ this position, last part is to get 1 or -1 ) goto _

Blockchain tezos
Smart Contract KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton
Platform HEN
Token ID 428467
Minted at 13 Oct 2021, 22:43 UTC

Metadata URI Metadata URI
Artifact URI Artifact URI

codeart , generative , interactive , loop , pixelart , opensource , pico8 , pico-8 , lua , tweetcart

JavaScript true
Networked false

Timestamp (UTC) 2024-08-18T03:19:25.878Z
Snapshot version 1
External network calls 0
Download Snapshot Download
Snapshot Image