Log In  
Page:
1
2
3
4
5
6
7
8

the use of sound is the coolest


Cart #24687 | 2016-07-06 | Code ▽ | Embed ▽ | 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

1

Cart #24693 | 2016-07-06 | Code ▽ | Embed ▽ | 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.


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

1

Cart #24719 | 2016-07-06 | Code ▽ | Embed ▽ | 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.


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


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

2

Cart #24753 | 2016-07-07 | Code ▽ | Embed ▽ | 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

1

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

Cart #24763 | 2016-07-07 | Code ▽ | Embed ▽ | 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

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 ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

140 chars on the nose.


1

Cart #24770 | 2016-07-07 | Code ▽ | Embed ▽ | 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 ▽ | Embed ▽ | 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

@guerragames:

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


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


1

Cart #24792 | 2016-07-07 | Code ▽ | Embed ▽ | 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

3

Cart #24811 | 2016-07-07 | Code ▽ | Embed ▽ | 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

Cart #24814 | 2016-07-07 | Code ▽ | Embed ▽ | 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<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)


Cart #24834 | 2016-07-07 | Code ▽ | Embed ▽ | 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 _

1

Cart #24873 | 2016-07-08 | Code ▽ | Embed ▽ | 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


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.

Cart #24890 | 2016-07-08 | Code ▽ | Embed ▽ | 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!


Cart #24891 | 2016-07-08 | Code ▽ | Embed ▽ | 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

Cart #24903 | 2016-07-08 | Code ▽ | Embed ▽ | 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

Cart #24906 | 2016-07-08 | Code ▽ | Embed ▽ | 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

Cart #24928 | 2016-07-08 | Code ▽ | Embed ▽ | 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

1

Cart #24936 | 2016-07-09 | Code ▽ | Embed ▽ | 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

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

1

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


this thread must live forever
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


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

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


Cart #25009 | 2016-07-10 | Code ▽ | Embed ▽ | 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


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

@zero01101:

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


@Felice

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!


@zero01101:

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.


Cart #25101 | 2016-07-11 | Code ▽ | Embed ▽ | 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 :'(


2

Cart #25186 | 2016-07-12 | Code ▽ | Embed ▽ | 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

2

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

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.


1

Cart #25235 | 2016-07-13 | Code ▽ | Embed ▽ | 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

2

Cart #25305 | 2016-07-14 | Code ▽ | Embed ▽ | 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 _

1

How about some snow?

Cart #25307 | 2016-07-14 | Code ▽ | Embed ▽ | 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


2

Here's my contribution :

Cart #25325 | 2016-07-15 | Code ▽ | Embed ▽ | 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

@RadicalTeapot that's gorgeous!


1

Cart #25423 | 2016-07-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

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

Page:

[Please log in to post a comment]