Weird automata - a pixel area is traced by a snaking 8-directional self-avoiding walk. Every time the snake hits a dead-end, that snake dies, and a new snake is born in a different color. No flip() done, so you can see the results quicker. The way it plays out looks somewhat painterly after a bit, before quickly devolving into random noise.

n=128k=1 r=rnd::a::x=r(n)y=r(n)z=9::b:: u=x-1+r(2)v=y-1+r(2)z-=1 if(pget(u,v)==0)x=u%n y=v%n z=9 pset(x,y,k) if(z<0)k+=1 goto a goto b |

electricgryphon: Yep! Well there's a bit going on there.

since * isn't defined, * will be nil, and nil values evaluate to false when used in conditionals. Anything that isn't nil or false is treated as true, so by using * and 1 you can get false and true with less characters (provided you don't use * elsewhere).

Also comparing two things that aren't defined (nil) will return true, so you can use that to initialize stuff potentially (like I did in my waterfall tweetjam). Watch out though, comparison ==/!= will actually treat false vs. nil as distinct values, same with true vs 1, and you can't do order comparison or arithmetic against nil.

I made an edit to Overkill's water tiles.

cls()memset(8192,1,4096)::a::srand(2)for f=1,60 do for n=1,8 do sset(rnd(8)+8,rnd(8),12) end sset(rnd(8)+8,rnd(8),7)map()flip()end goto a |

Concept being, I've been hoping someone would make a cart which uses a fixed seed to generate an intentional and deliberate "random" animation in a way which looks handcrafted despite that not being possible in so few characters.

Actually, here's an even smaller alternative. (No cls, and why use two ssets when you can use one?)

memset(8192,1,4096)::a::srand(3)for f=1,50 do for n=1,12 do sset(rnd(8)+8,rnd(8),rnd(16)>1 and 12 or 7) end map()flip()end goto a |

I made it a separate cart since the animation is different, but I think I like it better this way.

::s::memcpy(0x0,0x6000,0x2000)for i=0,999 do x=rnd(128)y=rnd(128)k=sget(x,y)if k>0 then circ(x,y,1,8+(k+1)%8)pset(x,y,k)end end flip()goto s |

@Felice: Thanks for the tip!!! I wondered if there's anything like that in Lua, awesome.

Everyone else, half of this stuff is magic to me. How you do mandelbrot and blinking analog TVs in under 140 … Magic.

I definitely feel 10 years old again, as I ws back in the early 90s, reading computer magazine listings with all the binary code programs while I only knew BASIC (ZX Spectrum) and it was also all magic. A master's degree in CS and 20 years of experience later … and something deceptively simple like Pico-8 brings me down to my knees. To everyone in this thread, kudos.

130

I was following my wife around as she was dress shopping when I saw an interesting pattern on one of them that I wanted to program for the tweetjam. I ended up accidentally finding this one which wasn't my original intention but still looks kinda cool.

t=0 d=18::s:: t+=0.1 for i=0,d*d do x=flr(i/d)*16-16+(i%2==0 and 8 or 0) y=(i%d)*8-8 circ(x,y,8*(1+sin((x+y+t)/128)),t)end goto s |

132

t=0 d=16::s::cls()t+=.005 for i=0,d*d do x=flr(i/d)*d-8*8+(i%2==0 and 8 or 0)y=(i%d)*8-d circ(x,y,6+(7+7*sin(t)),7)end flip()goto s |

Neat, @guerragames. That colorful one looks like Batik!

My last one was sorta aggressive. This one is much calmer: a nice midnight drive under the stars ^__^

w=128i=78t=0l=circfill ::s:: t-=1 l(i,i,w,1)srand()for y=1,i do x=(rnd(w)+t)%w l(x,y,sin((y+t)/17)*2,6)line(x*9,w,x,i+y%7,3)end flip()goto s |

I just discovered that you can in fact vote for carts from this thread if you go on the user's cartridge page, like here. So the vote could probably be integrated with each cart player instead of only for the thread ... that would be so cool

inspired by 'tweetjam' by NuSan (great dissolution ^^)

one-liner @140 including eol

n=128w={}r=rnd::s::for i=1,4096 do pset(r(n),r(n),0)v=w[i]x=i*4-4print(8,x,v,3)v=v and(v+6)%n or r(n)print(8,x,v,6)w[i]=v end flip()goto s |

Nice @ultrabrite that is exactly the effect I wanted to make and couldnt manage in 140 characters. So it seems I need to work on how to use array effectively !

@ultrabrite holy crap, that is spot-on

...those who drink from the rainbow cup

will love like a summer's eve

both flame and the flood

without shyness' leave

cls()t=0::s:: t+=1 for y=9,33 do for x=0,9 do g=x/y h=y^2/9+cos(g*.7-t/7)*y/9+sin(g+t/9)pset(x+7,h,y-t)end end print("love",0,0)flip()goto s |

This thread is so amazing. It's inspired me to finally play with Pico-8, so thanks to Adam and everyone else for that. (I have literally played every single cartridge posted in this thread so far.)

Anyway, here's my first cartridge for submission, just some simple purple dots on a grid:

EDIT: (Oops, forgot the code, not that it's terribly exciting, maybe it'll help some beginners.)

cls() while 1 do for x=0,8 do for y=0,8 do circfill(x*16,y*16,rnd(5,10),rnd(16)%3) end end end |

[Please log in to post a comment]