

function _draw()for x=0,63 do for y=0,63 do k=rnd(3)-1 a=x*2+k b=y*2+k c=pget(a,b) c+=flr(rnd(9)/8) pset(a+rnd(3)-1,b+rnd(3)-1,c)end end end |


t=0 while 1 do cls() for i=0,14 do y=84+4*sin(t+i/15) rectfill(i*9-5,0,i*9+5,y,7) circfill(i*9,y,5) end circ(25,25,15,0) t+=.01 flip() end |
The character limit pretty much forces you to make something abstract, but I wanted to try and make a scene of some sort. :)


waterfall
cls()t={}w=128 function _draw()for i=1,w do y=t[i] if(y==e)y=flr(rnd(w))-9 rect(i,y,i+2,y,({1,7,12})[flr(rnd(3))+1])t[i]=y+1 end e=w end |
This takes advantage of the fact that comparing two nil values together is true to initialize a table on the first pass inside the draw loop!


125
t=0 m=12 function _draw()t+=0.05 for n=0,m*m do x=n%m y=n/m circfill(x*12,y*12,12+4*cos(t+y/5)+4*sin(t+x/7),8+(x+y)%8)end end |
edit: forgot to replace a few 12's with "m" to save 3 more chars :P


function _draw()for x=0,63 do for y=0,63 do k=rnd(3)-1 a=x*2+k b=y*2+k rectfill(a-1,b-1,a+1,b+1,pget(a,b)+flr(rnd(99)/98))end end end |


Not tweet length, sadly >:(
cls()
c=0
f=0
while 1 do
for x=1,128 do
for y=10,80 do
r=rnd()
p = pget(x,y)
pn = pget(x+1,y)
if(pn~=0 and p==0)then
if(r<.8)pset(x,y,pn)
else pset(x,y,p.99(y/128)) end
end
end
c+=1
circfill(120,50+cos(f)25,r3,7)
if(c>5)then f+=rnd(.02)
end
end


I decided I wanted to try to make something that was somehow interactive. Here's my tweet-length "RPG" (ha).
You press "Z" to "attack" and then the monster attacks. Monster HP on the left, your HP on the right. Attack until one of you (or both) is dead. If you run this in the PICO-8 app, it'll quit back to the command line after it ends. But in the cartridge version I guess it's perma-death. ;)
u=8 m=6 cls()function _draw() if btnp(4) then m-=flr(rnd(3)) u-=flr(rnd(4)) print(m..":"..u) end if(m<=0)print(":)") if(u<=0)print(":(") end |
I had a version that displayed a bit more information to the player, but had to remove it to fit in 140 chars. :D
Owen


s=0 x=64 _=127 while x>0 and x<_+1 do memcpy(24576,24640,8128)pset(x,_,0)x+=4-rnd()*8 pset(x,_,-abs(64-x)/8)flip()s+=1 end print(s.." \135") |
140/140
Which side will win, right or left? What will your final score be? Never before have video games been as tense and exciting as this!


Exactly 140 :)
Press <z> to flap. Quite playable for the size IMO. Try to finish the level without hearing a single crash sound.
d=16 w=64 x=0 y=0 function _draw() x+=2 x%=d*w cls()map(0,0,-x,0,d*d,d)spr(0,w,y)y+=1 if(fget(mget((x+w)/8,y/8),0))sfx(0) if(btn(4))y-=6 end |
I hope using sprites is not cheating ;)


I couldn't quite do what I wanted in one tweet, so I used two (heresy!)
function r(a) return flr(rnd(a)) end function n(a,b) return {a,b,(r(4)+1)*(2*r(2)-1),(r(4)+1)*(2*r(2)-1),r(15)+2} end a={n(9,9)} function _draw() cls() for b in all(a) do b[1]+=b[3] b[2]+=b[4] if (b[1]>120 or b[1]<8) b[3]*=-1 if (b[2]>120 or b[2]<8) b[4]*=-1 circfill(b[1],b[2],3,b[5]) end add(a,n(a[1][1],a[1][2])) end |
edit: tweets are 140 not 160 chars. Failure on all accounts :)


memcpy(0,24591,336)cls()sset(0,5)t=0::_::for i=0,15 do for j=0,15 do for k=8,15 do pal(k,i+j+k+t)end spr(0,8*i,8*j)end end t+=1 flip()goto _ |
137/140
If I only had two more characters I'd be able to fit in a cls() and fill the entire screen.
Edit: was able to squeeze in a cls() by using goto
@Alberton: oh man, that's genius. If it wasn't for the character limit you could probably do something nice with this by combining it with the secret wide characters (\130,\140 etc).


@Alberton and @qbicfeet These are absolutely amazing!!! Do you mind me using those snippets for a game later? There would be attribution of course. :)


s=0 o=1 while 1 do o-=.001 if(o<1) then o=99 cls() print(s,9,4,7) end if(btn(4)) then if(o<9 and o>2) s+=1 o=1 end print("^",9,o,8) end |
140 characters on the button. I wanted to make a game that involved reflexes and scoring. It ended up being very, very simple.


uuuuhhhh these are all absolutely incredible and i personally love each of you


cls()b=128 x=b y=b d=0 while 1 do x+=cos(d) y+=sin(d) if pget(x,y)==0then d=rnd(1)end if d%(b*b)>.87then x=70 y=b end pset(x,y,d*4+7) end |
137 chars.
I wanted to make a self-playing breakout at first but couldn't fit it below 200 chars, so here's a stripped version :)


well after last night's experiement I had to make a proper one <140 chars - got it to 138 in the end :)
a=9 b=40 c=1 e=1 f=2 function _draw() for i=1,c do a+=e b+=f if(a>128 or a<0)e*=-1 if(b>128 or b<0)f*=-1 circfill(a,b,6,c%15) end c+=1 end |
Warning: flashing colours!


s={} function _draw() cls() local o={} o.x=rnd(150) o.y=0 add(s,o) foreach(s, function(s) s.y+=1 s.x-=rnd(1) print('*',s.x,s.y,7) end) end |
139 character snow storm.


use the submit cart option from the forum main area, then insert that tag in a normal post!


Hello there, I ended up with this. I wanted first to play with sound but it took way too much characters...
t=0 while 1 do for y=16,128,32 do for x=0,128,16 do c=x/69+y/9+t rectfill(x,y+sin(t*2)*9,x+16*sin(c),y+21*cos(c),c)end end flip() t-=.04 end |


building on the snow from @jefferycampbell, I did a little parallax scrolling starfield.
exactly 140
t={}function _draw()cls()add(t,{s=rnd()*3.1,x=0,y=rnd(127)}) foreach(t,function(s)s.x+=s.s n=s.x>127 and del(t,s)pset(s.x,s.y,s.s+5) end)end |
edited to save a few characters and get better colors.
[Please log in to post a comment]