That smell of fresh cut grass always gives me the shakes.

w=128x=0y=0 cls() ::s:: x-=1 print("|",rnd(w),rnd(w),x%2*8+3)circfill(x+4,y+4,6,0)print("\130\n\137",x,y,7) if(x<-8)y=rnd(w)x=w flip()goto s |

140

A little late to the 4th of July celebration!

Note: press <z> for a guest appearance.

s=128q=32t=0::a::b=0 t+=.1 if(btn(4))b=1 for i=0,s do for j=0,s do d=2+cos(t)c=sget((b+i/s)*q,(j+d*sin(t+i/q))*q/s)pset(i,j,c)end end goto a |

Cheated a little again by using sprite images.

Inspired by Benjamin's awesome ring of fire effect but I tried to make the weird colors go away (mine has a color table).

EDIT: Realized there was a completely redundant check.

r=rnd t={0,1,9,2,7,2,10,4,8,9}::s::x=r(z)y=r(z)c=pget(x,y+r(2))z=127 if(r(50)<c)c=t[c] circ(x,y,1,c)pset(y,z,7)goto s |

EDIT: Reordered the r=rnd to gain one character.

t={0,1,9,2,7,2,10,4,8,9}r=rnd::s::x=r(z)y=r(z)c=pget(x,y+r(2))z=127 if(r(50)<c)c=t[c] circ(x,y,1,c)pset(y,z,7)goto s |

I wanted to make something that scrolled through the results of rnd() by using the x/y position as the seed.

n=0::s:: n-=1 for y=50,90 do for i=n,127+n do srand(i)srand(rnd(y))pset(i-n,y,rnd(3)+8) end end flip()goto s |

Then I noticed I had room for more so I added a print command and it made a crazy stretching effect.

140 chars:

n=0::s:: n-=1 for y=50,90 do for i=n,127+n do srand(i)srand(rnd(y))pset(i-n,y,rnd(3)+8) end end print("connorses tweetjam2016!")flip()goto s |

Then I messed around with a SWEET SINE EFFECT. (and still had room for the print)

under 140 chars:

n=0::s:: n-=1 for y=10,60 do for i=n,127+n do srand(i)srand(rnd(y))pset(i-n,y*sin((i-n)/85)+64,rnd(3)+8) end end flip()goto s |

Also these work when I load them in Standalone, but when I upload them I get "CART FORMAT ERROR 1" and they don't display. HELP.

@Connorses Well in firefox when I click on the cartridge image, firefox says that the image can't be displayed because of errors, so maybe try re-uploading the cartridge?

@JeremyRedhead Thanks! Fixed my original post.

I may or may not have forgotten to save as .png

@kometbomb: That is some darned fine fire. :)

@Blokatt: that sounds pretty creepy/weird/awesome!

131

z=128o=64t=z::a:: t+=.1 for i=0,z do for j=0,z do v=i-o u=j-50pset(i,j+16,pget((t+atan2(v,u)*8)%8*6,sqrt(v^2+u^2)/5))end end goto a |

121

z=128o=64t=z::a:: t+=.5 for i=0,z do for j=0,z do pset(i,j+16,pget((o+(o-i)/(((z-j)/z-1)*2))/4,(j/3+t)%10))end end goto a |

129

With Felice's tweaks looks much better:

z=128o=64t=z::a:: t+=.5 for i=0,z do for j=2,z do pset(i,j+16,pget((o+(o-i)/(((z-1.5*j)/z-1)*2))/4,(-1024/j+t)%10))end end goto a |

@Felice: nice, that looks much better!

Yup, looks fabulous actually. :) Great idea, btw! Another movie intro to add to the list. :D

For perspective, you always need a divide by distance somewhere, so you just look for a variable that is, or is linked to, distance, and use that.

r=rnd ::s:: sset(r(16),r(16),r(16)) for i=0,999 do x=r(128) y=r(128) rect(x,y,x+1,y+1,sget(x/16,y/16)) end flip()goto s |

I tend to yelp when a neutrino strikes me. It's embarrassing.

This is inspired by 1bardesign's IFS simulator.

cls()::s::t=0w=128 r={}r=0g=0 x=rnd(w)y=rnd(w)::m:: pset(x,y,pget(x,y)+1)t+=1 r+=sin(x/64) g-=cos(y/64) x+=r y+=g if(t<w)goto m flip()goto s |

Whoops. Misspelled neutrino.

@tracevol_dog: you can make it even fuzzier by randomising the rectangle size:

r=rnd ::s:: sset(r(16),r(16),r(16)) for i=0,999 do x=r(128) y=r(128) rectfill(x,y,x+r(5),y+r(5),sget(x/16,y/16)) end flip()goto s |

and with rect and larger value it do an intersting effect too:

r=rnd::s::sset(r(16),r(16),r(16)) for i=0,999 do x=r(128) y=r(128) rect(x,y,x+r(15),y+r(15),sget(x/16,y/16)) end flip()goto s |

(119 chars)

140

z=128o=64t=0::a:: t+=1 for i=0,z do for j=0,z do v=i-o u=j-50pset(i,j+12,pget((t+atan2(u,v)*144)%36,(t+z*8/sqrt(v^2+u^2))%12))end end goto a |

Why is this so adictive? I should be working on a game! :D

That might be your best one yet, guerra. :)

Heads up that v^2 is 9x slower than v*v. You might want to change those two ops. The ^ operator is akin to the pow() function, which is notoriously slow vs. manually doing the multiply for easy powers like 2.

It's actually the same cost as atan2 (9cyc), and three-quarters of the cost of a sqrt (12cyc), just for reference.

Thanks Felice!

You're right! Good catch! I actually had it as (i-o)*(i-o) so my progression in reducing the size was to fist do (i-o)^2 instead of doing the extra variable first, bummer. But yeah, I almost never use pow in real code.

My first ever game with the pico8.

s=0;y=s;w=42::l::cls()b=btnp(5)t=b and w-y<2 s=b and (t and s+1 or 0) or s y=(y>w or b) and 0 or y+1 pset(21,y)line(0,w,w,w) ?s flip()goto l |

Press x to score points, but not too early!

The colours randomise every time you run it.

Thanks to springogeek for tiny char-saving optimisation techniques!

t=0 z=128 u=rnd i=1+u(11)::s::for x=0,t do q=u(z)w=u(z)a=pget(q,w) if(a>0) circ(q,w,1,a)end t=min(t+9,z*9)pset(u(z),u(z),i+q%4)flip()goto s |

r=rnd::s::for i=0,999 do x=r(129)y=r(129)k=r(6)rect(x-k,y-k,x+k,y+k,min(1,pget(x,y))*(time()%7+8))end print("'sup",56,60,7)flip()goto s |

So springogeek's rhythm game reminded me of the old pong-style games of the 70's. I tried writing a 1P squash game, but I couldn't make it fit in 140 characters. So I rewrote the rules a bit and gave myself two tweets' worth of space to write a 2P game. :)

This is a pretty simple version of the game, where the ball wraps when you score and you can't impart spin. It's functional, but not really meant for playing. The reason why I wanted to post it is that I made the code 100% unconditional. The only branch is the goto at the end of the loop. I figured maybe someone would might find it interesting. Or not. :) Either way it killed an afternoon.

E/D moves left paddle, up/down moves right.

-- unconditional simple pong -- for tweets jam ;) by felice ------------------------------- -- m,n are top/bottom score*2 -- p,q are paddle positions -- u,v are ball velociy -- x,y are ball position -- w is width-1 (shh) ------------------------------- s=sgn r=rectfill u=1v=.7m=0n=0w=127 x=64y=x p=48q=p ::f::b=btn() p+=1-flr(b/1024%4+1)%3 q+=1-flr(b/4%4+1)%3 cls()r(0,p,3,p+31,7)r(w-3,q,w,q+31,7) ?m/2,9,5,5 ?n/2,w-9,5,5 t=y+v v*=-s(t)*s(t-w) u*=s(6-pget(x,y)) r(x-2,y-2,x+1,y+1,7) x+=u y+=v m+=1+s(x-w) n+=1-s(x) x%=w flip()goto f |

140+140 chars ;)

First tweetjam (or shared pico-8 cartridge of any kind).

It's a fairly simple fireworks effect but pretty pleased with it for a first attempt. 139 characters.

p=pset r=rnd w=127 function _draw()if(not n or n>9)then v=r(w)b=r(w)n=0 end c=r(15)cls()p(v+n,b+n,c)p(v-n,b+n)p(v+n,b-n)p(v-n,b-n)n+=.5 end |

Just one more, promise, then I quit.

This gets way harder when you actually have something in mind.

t=0::s::flip()cls()t+=.02 for z=5,99 do n=64-z/2y=99-z camera(sin(t+z/99)*6-64)pset(-n,y,6.2+sin(z/80))pset(n,y)line(-n/7,y,n/7,y)end goto s |

Hey this is my first cartridge!

Not as good as other rainbowed submission, but Im having fun... and I'm starting to feel hooked

139

y=0 t=0 d=1::s::poke(0x5f2c,7)t+=.1 if t>9 then flip()t=0 y+=1 if (y>19) y=0 end for z=0,9 do w=y*rnd(z)pset(t*14,w,sin(t)+w*t/9)end goto s |

Why are you shifting right by 1.4? I don't think that does anything other than shift by 1.

Also, just FYI, constants and variables are the same perf cost. No need to pre-load your h and m values if you only use them once each. This is more stylistic than anything, so do what you please, just thought I'd mention it in case it saves you chars in a future submission. :)

i'm going to go with... uh... i'm new at this and probably was literally changing magic numbers and got distracted when a program was suddenly not visually nauseating AND fit into a tweet, and just uploaded it :D

...and yeah, same for declaring h/m...

but thanks!

Heh, we all do it. Sometimes I find magic numbers or what a friend used to call "stochastic coding" (a.k.a. Change It Randomly Until It Works) left over in my own code and I'm actually surprised that it was still somehow running correctly.

140

z=128t=0::a:: t-=1 for i=0,z*z do v=i%z-64 u=i/z-50n=atan2(v,u)pset(i%z,i/z+12,pget((t+n*z)%42,(t-t/z*sqrt(v*v+u*u)-24/(1+n))%12))end goto a |

PS. It's not really perfect... and the screen tears quite a bit :'(

140

A little variant of my previous Blood Circle Waterfall.

s=64r=rnd::a::x=r(128)y=r(128)u=x-s v=y-s m=sqrt(u*u+v*v)line(x,y,x+u/m*4,y+v/m*4,pget(x,y))pset(x,y,0) if(r(s)<1)circ(s,s,24,9+r(2)) goto a |

You read this in horror.

pal(0,7,1)f=44 t=f::s::m=t%f ?sub('all work and no play makes jack a dull boy',m,m) cursor(m*3,flr(t/f)*6)flip()t+=1.07 if(t>881)t-=f goto s |

140 characters.

EDIT: I didn't realise you can just provide the cursor arguments directly to the shorthand PRINT (?), saving 7 characters. Oh well. (Although with the code the way it is, it means the text is misaligned by one character.)

pal(0,7,1)f=44 t=f::s::m=t%f ?sub('all work and no play makes jack a dull boy',m,m),m*3,flr(t/f)*6 flip()t+=1.07 if(t>881)t-=f goto s |

@solar: awesome idea and execution! it's my favorite phrase to type when testing a new keyboard.

poke(24364,7)t=0r=rnd::s:: t+=0.1 for i=0,999 do x=r(64)y=r(64)rect(x-1,y-1,x,y,pget(x,y)+r(99)/98)end pset(63,63,8+t%8)flip()goto s |

124

Spirals are so mesmerizing, I can watch them all day and go insane.

Let it run for a while, it'll keep doing more and more weird spirally things.

s=64t=0::_::cls()t+=.0001 x=s y=s for i=1,350 do j=i*t u=x v=y x=x+j*sin(j)y=y+j*cos(j)line(u,v,x,y,8+i/60) end flip()goto _ |

Here's my contribution :

138 characters:

r=rnd t=0 ::s:: t+=0.1 for i=0,999 do x=r(128) y=r(256) rect(x+r(4)-2,y-r((sin(t*.1+x)+1)*48),x,y,pget(x,0)+r(99)/98) end flip() goto s |

r=rnd::s:: for i=0,999 do x=r(128)y=r(128) c=pget(x,y) if(c>0)c+=r(99)/97 ?"\135",x-3,y-2,c end line(0,127,127,127,7) flip()goto s |

[Please log in to post a comment]