x,y,u,v=0,0,0,0::_::cls()v=y>64 and(btn(4)and-2 or 0)or v+.1 u=(btn(0)and-1 or btn(1)and 1 or u*0.9)y+=v x=(x+u)%128 pset(x,y,8)flip()goto _ |

The most basic possible platformer. I wanted to see could I fit something that "felt" like an ok platformer into one of these.

y=9 p=0q=0 n=1 while n>0 do cls()circfill(9,y,9,7)y+=q;q+=p;p+=0.001 if(y>(99))q=q*(-0.9*n); n-=0.03 flip()end print("#pico8 #tweetjam",9,9) |

Putting these here: https://github.com/mattleblanc/picotweets

t=127l=t while l do cls()for x=0,l do for y=0,l do if((x%9+y%9==0))line(x,y,x+cos(sin(t*y))*9,y+cos(sin(x*t))*9) end end t+=1/9999 flip()endw |

This tweetjam turns Pico-8 screen into a 64 bits number, incrementing 55,000 times / second. Which is rather quick, right? Not if you're the leftmost bit: you won't be set to 1 before 5,317,658 years. That is, 2^63/55000/3600/24/365. Quite a bit. And all bars will be light blue in no more that twice that duration.

@irdumb I'm almost positive that's "The Slow and the Curious"

Also hey I finally started making some tweetcarts, too:

**Vortex Clock**

cls() a=0 r=0 function _draw() for i=0,150 do r+=1 if r>150 then r*=-1 end a=(a+5)%360 pset(63+r*cos(a/360), 63+r*sin(a/360),r%16) end end |

(I also found an easy way to get 180 patterns out of this by changing one value, so I made a little visual toy for doing that: Patterns)

**Scrolling Ordered Chaos**

p=0 o=1 function _draw() for p=0,127 do for i=0,128 do pset(p,i-o%2,(p+i*o)/16) o+=1 pset(p,i-o%2,(p+i*o)/16) end end o+=1 end --wtf is this |

I made this effect almost completely by accident.

Falling brick

y=0 x=rnd(120) function _update() y=y+rnd(10) if y>128 then y=0 x=rnd(120) end end function _draw() cls() rectfill(x,y,x+7,y+7,7) end |

*how do I make you able to play the code?*

Mouse controlled!

poke(24365,1)h,v,a,b=0,0,2,2::g::x=stat(32)cls(1)h=(h+a)%128 v=(v+b)%128rect(x,59,x+8,60) if(pget(h,v)!=1)b=-b a=h-x-4 pset(h,v)flip()goto g |

t=0::l::for i=0,99 do x,y=rnd(128),rnd(128) circ(x,y,1,7+(x/30+y/30+cos(t/4))%8)end t+=0.01 flip()goto l |

49 chars

New 140 character tweetcart

Implementation of the [url=http://fabiensanglard.net/fizzlefade/index.php] linear-feedback shift register

fade[/url] used for the Wolfenstein 3D death animation. Colours each pixel on the screen red in a chaotic fashion (other than 0,0 which has to be set outside the main loop) without repetition until the cycle starts from the beginning again. And unlike the Wolfenstein 3D version there's no wasted iterations where you have to skip drawing.

A less terse version of the code:

pset(0,0,8) repeat b=band(v,1) v=flr(shr(v,1)) if b!=0 then v=bxor(v, 0x3802) end i+=1 if i%128==0 then flip() end pset(shr(band(v,0x3f80),7),band(v,0x7f),8) until(v==1) |

Could be useful for anyone who wants to implement this kind of fade effect or anything else where you want to chaotically loop over a range of values without repetition or wasting CPU cycles by calling rnd() repeatedly and checking if you've previously gotten the same result.

c=cos;s=sin;t=5::_::t+=.01for i=0,990 do;x=rnd(127)y=rnd(127)p=x;o=y;w=80+10*s(t);x+=s(o/w+t)*9y+=c(p/w-t)*9q=60+30*c(t/2)v=mid(8,11.3+(s(x/q+t-x/q/2)*.7+s(t/4)*.3+c(y/q-t-y/q/2)*.7+c(t/4)*.3)*1.7,14)fillp()circ(p,o,2,v)fillp(23130.5)circ(p,o,2,v+.5)end;flip()goto _ |

new year, new collection of all my tweetjam carts: https://seansleblanc.itch.io/tweetcarts-2017

n=128;r=rnd;c=circ::_::a=0::y::c(64,64,55+a/7,7)a+=1;c(74+a*.9,38+a*2,9-a/5)c(35+a*1.5,35,3.5)c(69-a,41+a*1.5,5.5-a/13)c(33+a/2,39,7)c(59,63,a/5)c(61,58,2) if(a<26)goto y memcpy(0,n*192,n*64)p=0::m::x=r(n)y=r(n)j=sget(x,y) if(r(j)<3)c(x,y,1,j) p+=1if(p<n*7)goto m goto _ |

t,f,s,j=0,0,1/10,1/10 ::_:: cls() t+=.007 f+=1 for a=0,s,j do x,y=0,0 for r=0,10+50*min(t,1),.5 do b=a+r/900 p,g,h=sin(r/(360*j*1.5)+t),64+r*cos(b-t)+r/3*sin(p),64+r*sin(b-t/2)+r/3*cos(p) if(r!=0)rect(g,h,x,y,a*15) x,y=g,h end end if (f%10==0)s=min(s+j,1) flip() goto _ |

t,q,c=0,sin,circfill::_::t+=.01cls(1)for i=0,128 do s=cos(t+i/25)y=i*2-(t%1*100) a=64+47*q(t+i/25)b=10+i/8.3%3 if(s<=0)fillp(23130.5) c(a,y,3.75+s,b)fillp()end for j=-10,2800 do k=59+j%10+q(-t*1+j/3)*39l=j/10+flr(t*50)%2 c(k,l,0,pget(k,l)+12)end flip()goto _ |

::_::r,s,p,t=rnd,sin,srand,time()/60p(t)for i=0,1999 do x=r(128)y=r(128+r())s(x)c=pget(x,y)circ(x-1+r(2),y-3,1,(c+r())%4+8) if(c==0)pset(x,y,r(3))end for i=0,20 do p(i)x=49+r(30)y=49+r(30)x=x+20*s(x*t)y=y+20*s(y*t)circfill(x,y,r(12)+s(t*60)*3,0)end flip()goto _ |

l,f,t,w,p=line,fillp,0,23130.5,sin::_::t+=.0151cls(1)y=0::m::c=62+p(y/50-t)*((y/3+9))+p(-y/30-t)*9 x=0 for x=0,5,.5 do s=9+((y-t*49.5)/3)%4.5+2+2*p(x/(5+y)) if(flr(s)%3==0)f(w) l(c+x,y,c+x,127,s)f()end f(w)l(c,y,c+5,y,13)f()y+=1-y/300 if(y<128)goto m flip()goto _ |

pal(7,1)n,q,r=127,64,rnd::_::for i=0,1390 do x,y=r(n),r(n)a,s=q-x,q-y l=(max(abs(a),abs(s))/5000)*sin(time()/10)z,u=cos(l),sin(l)w,d=z*a-u*s,u*a+z*s circ(q+w*1.07,q+d*1.07,1,max(7,pget(q+a,q+s)-flr(r(2))))end for i=0,3 do circfill(r(n),r(n),r(3),15)end goto _ |

o,s,j=19,sin,{2,4,9,10,7}cls()::_::t=time()for i=0,512 do x,y=i%o,flr(i/o)v,b=9+s(t/10)*6-x,13-cos(t/10)*6-y a,l=atan2(v,b),sqrt(v*v+b*b)c=j[flr((s(a*s(t/20)*10+l/15+t)/5+s((v*b)/150+t)/5)*5.5+3.5)] ?"◆",x*7-4+(1-y%2)*3+rnd(2),y*5-4+rnd(2),c end goto _ |

l=0::_::f=0 for i=0,127 do if(pget(i,127)>0)f=1 end if(f==0)pset(63,127,7) if (l%16==0) then r={0}for i=1,7 do add(r,flr(rnd(2.3))) end end l+=1 memcpy(0x6000,0x6040,0x1fc0)for x=0,127 do n=0 for b=0,2 do if (pget(x-1+b,126)>0)n+=2^b end pset(x,127,r[1+n]*7) end flip()goto _ |

Adding a cart with id of "tweetjam" so that you can view all of the carts in this thread from SPLORE by searching for: "thread:tweetjam"

r=rnd::_::srand(0)f=t()/9 cls()n=650+sin(f/3)*60 for i=1,n do a=f+r(1)d=.3+r(9)y=-3 if (i>400) then j=i-400 y=j*2/n-1 a=j*40/n+f+j/3 d=j*3/n end x=d*cos(a) z=2+cos(f)+d*sin(a) x=64+x*64/z y=64+y*64/z c=6+i%5 e=5/z if(z>.1)circfill(x,y,e,c)circfill(x,128-y,e,c/4) end flip() goto _ |

[Please log in to post a comment]