1K Among Fish #Pico1k
Eat fish smaller than you and grow up. A game in 1022 Compressed Bytes of code for PICO-1K Jam 2022 #Pico1k
Code:
_set_fps(60)h=0t={{7,7},{8,8},{10,8},{12,10},{16,16},{20,20},{24,24}}poke(24405,0)for i=0,63do v=ord("#2&##2:#$2:')/58(.4;)/5;$2:'#2&#",i\2+1)-35sset(i%8,i\8,v\5^(i%2)%5)end for i=0,15do x=i*8a=1+rnd(3)\1b=124+sin(i/8)*4\1rectfill(x,b,x+7,127,2)for j=1,a do y=b-j*8rectfill(x+3,y,x+4,y+7)rectfill(x+2,y+1,x+5,y+4)end end poke(24405,96)::s::f=0p={{x=64,y=64,z=2,u=1,i=0,l=1}}n={2,2,2,2,2,2,2}s=0?"\asa.f.f.f.c4cc.f3.c4cc" w={}for i=1,16do w[i]={x=rnd(128),y=rnd(256),v=1-rnd(.5),a=rnd(),r=1+rnd(4),c=3+rnd(2)\1}end pal({1,3,131,140,2,4,138,128,140,139,13,12,8,9,10},1)::_::cls(1)f+=.01for z in all(w)do z.y-=z.v circfill(z.x+8*sin(z.a+z.y/64),z.y,z.r,z.c)if(z.y<-8)z.x=rnd(128)z.y=144end o=p[1]c=o.z\1for i=1,max(5,c+2)do if(n[i]>0)n[i]-=1a=rnd(2)\1*2-1add(p,{x=rnd(64)+32-a*96,y=4+rnd(15)\1*8,z=i,u=a,v=a*(.2+rnd()),i=1,l=1})end for q in all(p)do r=t[q.z\1]if q.i<1then b=btn()a=b\2%2-b%2q.x=mid(4,q.x+a,124)q.y=mid(4,q.y+b\8%2-b\4%2,116) if(a!=0)q.u=a else q.x+=q.v if 2*abs(q.x-o.x)<t[c][1]+r[1]and 2*abs(q.y-o.y)<t[c][2]+r[2]then if(q.z>=c)h=max(s,h)cls(5)flip()goto s o.z=min(o.z+.1,5)q.l=0s+=1?"\as8ceg" end if(q.u<0and q.x<-32)q.l=0 if(q.u>0and q.x>160)q.l=0 end for i=1,4do pal(i,4+(i+q.z\1)%4)end sspr(0,0,8,8,q.x-q.u*r[1]/2,q.y-r[2]/2,q.u*r[1],r[2])for i=1,4do pal(i,i)end if(q.l<1)n[q.z]+=1del(p,q) end?"\^w"..s.." "..h,3 spr(128,0,64,16,8)poke(24404,96)for i=0,7do pal(i,i+8)end for i=0,127do c=8*sin(f/4)a=(i+c)\3b=min(128,32+2*(i+c))\1-a sspr(a,i,b,1,a,i)end for i=0,7do pal(i,i)end for i=0,127do a=1.5*sin(f+i/32)if(a!=0)sspr(max(a),i,127-abs(a),1,max(-a),i) end poke(24404,0)flip()goto _
Comments
Log in with itch.io to leave a comment.
Hi!
Is there an ending for this game?
I'm afraid not. Once you get to a maximum size, other fishes appear that are even larger than yours and can be very fast, making it harder to avoid them. Being heavily constrained on code size by jam rules means you have to sacrifice a lot of non-essential things.
nice game! I got up to 57! really very beautiful. graphics are superb.
this is quite an addictive game!
Love the presentation and the gameplay! Had quite a bit of fun making my fish as chonky as it would get :)
Thanks! As your fish gets chonkier, game unlocks larger size fishes and it's more difficult to avoid collision.