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 |

poke(24364,7)w=64 t=0::s:: t+=0.3 for i=0,5000 do x=rnd(w)-w y=rnd(w)-w pset(x+w,y+w,bxor(atan2(x,y)*16,256/sqrt(x*x+y*y)+t)%3)end goto s |

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.

w=64 t=0::s:: t+=0.1 for i=0,5000 do x=rnd(w*2)-w y=rnd(w*2)-w circ(x+w,y+w,1,bxor(16*(atan2(x,y)+cos(t/w)),256/sqrt(x*x+y*y)+t))end goto s |

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.

a=0 while 1 do cls()for i=0,100,4 do s=sin(a)*i/2 c=cos(a)*i/1.5 circ(64+s,64+c,i,i%15)circ(64+s,64+c,i+1,i%15)end a+=0.02 flip()end |

I didnt know you could gain characters by regrouping some lines together, prety usefull

r=rnd t=0::s::srand()c=cos(t)s=sin(t)cls() for i=1,999 do x=r()-.5z=r()-.5n=64/(s*x+c*z)pset((c*x+s*z)*n+64,r()*n,7)end t+=.005 flip()goto s |

a=0 while 1 do cls(2)for i=4,96,8 do s=sin(a)*9 c=cos(a)*9 for h=0,1 do circ(64-c,64-s/2,i+h,9)circ(64+s,64+c,i+h,9)end end a+=.03 flip()end |

Hello :] my very first pico-8 thing...

That was fun!Nice stuff everyone :)

z=64 t=0 cls() function _draw() for i=-32,32 do circfill(rnd(1)+z+16*cos(t*i),z+16*sin(t*i),i*sin(t),4*t+(i%3)) end t+=0.001 end |

::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 |

paint blast

t=0n=99k=64 f=sin::s::for i=1,n do s=f(t+(i^3-i^2)/n)c=f(.25+t+(i^5-i^3)/n)circfill(k+s^3*99,c^3*n+k,8,i%3+t*2) end t+=.005 flip()goto s |

Oh, this is stupid fun. Here's 37 painters disagreeing with each other:

a={} while(1)do for i=1,37 do a[i]=a[i]or{x=i*3,y=i*7}b=a[i] b.x=(b.x+rnd(2)-1)%128 b.y=(b.y+rnd(2)-1)%128 circfill(b.x,b.y,i%5,i) end end |

You're flipping between channels on your old analog TV, looking for your favourite colour.

i=0::s::a=24576 s=sin(i/102)*100 memset(a+4000+s,i,64) o=1+s*10 memcpy(a+o,a,max(0,8192-o)) flip() i+=1 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 |

t=0::s::cls()srand()for i=1,500 do p=9-i/50 j=(p+sin(t)-t*9)%11+.1 k=rnd(9)-5+cos(t)circfill(k/j*50+64,80/j-20,9/j,p)end t+=.01 flip()goto s |

Thanks nyarlu! How does this all work? Shy guy will explain it all, if you ask nicely.

h=64q=32l=circfill t=0m=sin::s:: t+=.03 cls()camera(m(t/7)*9)l(q,q,h,7)l(q,q,9,0)l(h+q,q)a=m(t)*3+8 b=m(t*4)*2 rect(h,h,q+a,h+b)flip()goto s |

This really is the funniest jam ever

t=7::s::l=0 for i=0,40 do a=64+30*sin(i*.1+t*sin(t*.1))*sin(t*7)line(a,i*9,l,i*9-9,t*300)l=a memset(24576+rnd(8190),0,2) end t+=.0005 goto s |

🐤 FLAPPYTWEET

- Use arrow up to jump over the walls
- If you hit a wall, you die

y=0 w=128 t=w while t>1 do cls()t+=1 srand(flr(t/w))x=w-t%w y+=1 if(btn(2))y-=2 pset(9,y)i=rnd(w)line(x,i,x,w) if(x==9 and y>i)t=0 flip()end |

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 !

thanks to kometbomb for the monte carlo trick!

I am on raspberrypi, so I can't figure out how to post my code, sorry!

Glitchy image and sound in 140 characters

r=rnd::s::l=4096 b=memset b(24576+r(l),r(l),r(l))for i=0,9999 do x=r()-.5 y=r()-.5 pset(.3/x%128,.3/y%128,0)end b(12800,r(l),10)sfx(0)goto s |

...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]