the use of sound is the coolest

P#24683 2016-07-06 00:12 ( Edited 2016-07-06 04:12)

Cart #24687 | 2016-07-06 | Code ▽ | No License

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 ```
P#24688 2016-07-06 01:24 ( Edited 2016-07-06 05:24)
1

Cart #24693 | 2016-07-06 | Code ▽ | No License
1

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.

P#24694 2016-07-06 02:30 ( Edited 2016-07-06 06:30)
6

Cart #24700 | 2016-07-06 | Code ▽ | License: CC4-BY-NC-SA
6

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)

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)
P#24698 2016-07-06 03:35 ( Edited 2016-07-06 09:37)
1

Cart #24719 | 2016-07-06 | Code ▽ | License: CC4-BY-NC-SA
1

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.

P#24716 2016-07-06 11:47 ( Edited 2016-07-06 16:04)

@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?

P#24718 2016-07-06 11:56 ( Edited 2016-07-06 15:56)

@JeremyRedhead Thanks! Fixed my original post.

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

P#24720 2016-07-06 12:05 ( Edited 2016-07-06 16:05)

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

P#24722 2016-07-06 12:11 ( Edited 2016-07-06 16:11)
2

Cart #24731 | 2016-07-06 | Code ▽ | License: CC4-BY-NC-SA
2

 ```n=0 a={1,0,"|","-"}::s::print(a[flr(rnd(4))+1])if rnd(6)>5then print(_,rnd(127),0,11)end n+=1 if rnd(30)>39 and n>25 then flip()end goto s ```
P#24732 2016-07-06 14:54 ( Edited 2016-07-06 18:54)
2

Cart #24753 | 2016-07-07 | Code ▽ | License: CC4-BY-NC-SA
2

 ```o=12544t=0::s::a=rnd(8192)t+=.005 poke(o+a,t*.01) poke(24576+a,peek(o+(a+rnd(350))*4)+1) print("no signal",10,67,7+sin(t/99)*4)sfx(a)goto s ```
P#24754 2016-07-06 20:11 ( Edited 2016-07-07 00:11)
1

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

Cart #24763 | 2016-07-07 | Code ▽ | No License
1

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 ```
P#24764 2016-07-06 22:13 ( Edited 2016-07-07 02:13)
3

With apologies to the others who've done the same theme... I'm a huge fan of the movie and I just had to see if I could get closer to the original effect.

Cart #24785 | 2016-07-07 | Code ▽ | License: CC4-BY-NC-SA
3

140 chars on the nose.

P#24768 2016-07-06 23:11 ( Edited 2016-07-07 05:05)
1

Cart #24770 | 2016-07-07 | Code ▽ | No License
1

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

Cart #24781 | 2016-07-07 | Code ▽ | No License
1

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 ```
P#24774 2016-07-06 23:39 ( Edited 2016-07-07 04:26)

Try starting your J loop at 2 and using -1024/J instead of J/3 in your pget(). :)

P#24777 2016-07-06 23:53 ( Edited 2016-07-07 04:00)

@Felice: nice, that looks much better!

P#24780 2016-07-07 00:19 ( Edited 2016-07-07 04:19)

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.

P#24782 2016-07-07 00:30 ( Edited 2016-07-07 04:30)
1

Cart #24792 | 2016-07-07 | Code ▽ | License: CC4-BY-NC-SA
1

 ```cls()a={"\135","\130"}t=0r=rnd::s::k=flr(t/99%2+1)x=r(128)y=r(128)t+=.001 ?a[k],0,1,8 pset(x+r(9),y+r(9),pget(x/15,y/15)) ?a[k],0,1,0 goto s ```
P#24793 2016-07-07 03:34 ( Edited 2016-07-07 07:34)
3

Cart #24811 | 2016-07-07 | Code ▽ | License: CC4-BY-NC-SA
3

 ```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 ```
P#24812 2016-07-07 08:32 ( Edited 2016-07-07 12:32)

Cart #24814 | 2016-07-07 | Code ▽ | No License

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

Whoops. Misspelled neutrino.

P#24816 2016-07-07 10:16 ( Edited 2016-07-07 14:50)

@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)

P#24833 2016-07-07 13:11 ( Edited 2016-07-07 17:17)

Cart #24834 | 2016-07-07 | Code ▽ | License: CC4-BY-NC-SA

 ```b=0::_::cls()y=99+sin(time()/2)*59 q=44-b w=85+b e=y-40 b-=b/5 rectfill(q,y+b,w,e,8+b/3)rect(q,e,w,min(127,y),7)flip() if(y>125) b+=4 goto _ ```
P#24835 2016-07-07 13:58 ( Edited 2016-07-07 17:58)
1

Cart #24873 | 2016-07-08 | Code ▽ | No License
1

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

P#24875 2016-07-08 01:06 ( Edited 2016-07-08 05:06)

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.

P#24876 2016-07-08 01:21 ( Edited 2016-07-08 05:24)

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.

P#24878 2016-07-08 02:25 ( Edited 2016-07-08 06:25)

My first ever game with the pico8.

Cart #24890 | 2016-07-08 | Code ▽ | License: CC4-BY-NC-SA

 ```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!

P#24888 2016-07-08 08:13 ( Edited 2016-07-08 12:23)

Cart #24891 | 2016-07-08 | Code ▽ | License: CC4-BY-NC-SA

 ```a=64 b=a ::i:: c=a d=0 ::s:: pset(a,b,c+rnd(2)) a+=rnd(2)-1 b+=rnd(2)-1 a=mid(0,a,128) b=mid(0,b,128) d+=1 if d>10^4then goto i end goto s ```
P#24892 2016-07-08 08:35 ( Edited 2016-07-08 12:35)

Cart #24903 | 2016-07-08 | Code ▽ | License: CC4-BY-NC-SA

Wanted a playable labyrinth but then made something completely different. Nevermind.

 ```a="\129\132\128" k=0;t=1::s:: k+=t;t+=.008;x=0;y=0::z::h=rnd(4) ?sub(a,h,h),x,y,7+t+(x*y/9)/k x+=4 if(x>128)y+=4;x=0 if(y<128)goto z goto s ```
P#24904 2016-07-08 11:53 ( Edited 2016-07-08 15:53)

Cart #24906 | 2016-07-08 | Code ▽ | License: CC4-BY-NC-SA

 ```t=0::l:: t+=.01 poke(24364,7) for x=0,4095 do c=flr(8+((x*(x/2/(x/2000)/40)+t)+sin(x/64+t)*8)%8)poke(24576+x,c+c*16) end goto l ```
P#24908 2016-07-08 12:36 ( Edited 2016-07-08 16:41)

Cart #24928 | 2016-07-08 | Code ▽ | License: CC4-BY-NC-SA

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 ```
P#24929 2016-07-08 19:00 ( Edited 2016-07-08 23:01)
1

Cart #24936 | 2016-07-09 | Code ▽ | License: CC4-BY-NC-SA
1

 ```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 ```
P#24937 2016-07-08 21:19 ( Edited 2016-07-09 01:19)

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.

Cart #24945 | 2016-07-09 | Code ▽ | License: CC4-BY-NC-SA

 ```-- 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 ;)

P#24944 2016-07-08 23:32 ( Edited 2016-07-09 03:38)

Cart #24959 | 2016-07-09 | Code ▽ | License: CC4-BY-NC-SA

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 ```
P#24961 2016-07-09 08:06 ( Edited 2016-07-09 12:06)
1

Cart #24969 | 2016-07-09 | Code ▽ | License: CC4-BY-NC-SA
1

93 characters

 ```c=0 t=0 h=24576 ::l::for o=0,8190 do t=(t+1)%1010 c=(c+8) if(t%16==0)poke(h+o,c) end goto l ```
P#24971 2016-07-09 13:30 ( Edited 2016-07-09 17:30)

Cart #24973 | 2016-07-09 | Code ▽ | License: CC4-BY-NC-SA

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 ```
P#24974 2016-07-09 13:54 ( Edited 2016-07-09 17:54)

@subpixel:
> This gets way harder when you actually have something in mind.

Yeah. It's weird, it's more challenging when you choose a goal, but it's more fun when you just mess around for effect.

P#24987 2016-07-09 14:51 ( Edited 2016-07-09 18:52)

Cart #25009 | 2016-07-10 | Code ▽ | License: CC4-BY-NC-SA

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 ```
P#25010 2016-07-09 20:32 ( Edited 2016-07-10 00:37)

Cart #25042 | 2016-07-10 | Code ▽ | License: CC4-BY-NC-SA

let it run for a few minutes, it takes patience

 ```h=24576 m=8190 t=0.9 ::l:: t+=.001 for o=0,m do poke(h+o,shr(o,1.4)%t) end goto l ```
P#25041 2016-07-10 10:21 ( Edited 2016-07-10 14:22)

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

P#25060 2016-07-10 20:47 ( Edited 2016-07-11 00:50)

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!

P#25061 2016-07-10 21:24 ( Edited 2016-07-11 01:26)

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.

P#25062 2016-07-10 22:18 ( Edited 2016-07-11 02:18)

Cart #25101 | 2016-07-11 | Code ▽ | No License

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

P#25102 2016-07-11 13:55 ( Edited 2016-07-11 17:55)
2

Cart #25186 | 2016-07-12 | Code ▽ | No License
2

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 ```
P#25191 2016-07-12 14:03 ( Edited 2016-07-12 18:03)
2

Cart #25213 | 2016-07-13 | Code ▽ | License: CC4-BY-NC-SA
2

 ```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 ```
P#25214 2016-07-13 00:24 ( Edited 2016-07-13 06:18)

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

P#25215 2016-07-13 00:37 ( Edited 2016-07-13 04:37)
1

Cart #25235 | 2016-07-13 | Code ▽ | License: CC4-BY-NC-SA
1

 ```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 ```
P#25236 2016-07-13 10:21 ( Edited 2016-07-13 14:21)
2

Cart #25305 | 2016-07-14 | Code ▽ | No License
2

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 _ ```
P#25306 2016-07-14 11:16 ( Edited 2016-07-14 15:16)
1

Cart #25307 | 2016-07-14 | Code ▽ | License: CC4-BY-NC-SA
1

138 characters

 ```t=0 c=circ::l::t=(t+0.2)%9 if(t<2)p,s=rnd(128),rnd(128) c(p+4,s+4,sin(t/9)*6,7)for j=0,31,8 do c(p+j%16,s+flr(j/16)*8,3,0)end flip()goto l ```

It's a bit messier than I hoped but it kind of works :P

P#25308 2016-07-14 11:56 ( Edited 2016-07-14 15:56)
2

Here's my contribution :

Cart #25325 | 2016-07-15 | Code ▽ | License: CC4-BY-NC-SA
2

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 ```
P#25326 2016-07-15 04:27 ( Edited 2016-07-15 08:27)

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