Wet Cat

A Pico-8 game made for the Pico-1k Jam 2023 (Pico-8 code must be at most 1024 bytes in compressed format).

How to play:

It's an apocalyptic flood! The water is rising. Everyone has fled the building, but all the cats were left behind! Try to save as many cats from drowning as possible, and don't drown yourself. Bring them to the rooftop and finally go up yourself. 

Saved cats will magically float up in the sky. And the player character too. Because uhm... that's how it works.

Arrow keys: move
Z/X : hold to move a nearby cat

Score: how may souls are alive. Starts at maximum 10 (9 cats and your own) . Try to stop the counter from going down.

Air: number of bubbles indicates how much air you have left. Goes down when underwater, up when you can breath again. 

Note: sometimes a cat escapes your grip. It's actually a bug in the code, but I left it in because it makes the game more interesting. Also, there are no bytes left to fix it :-)

Note: the concept of this game is actually quite similar to my older Pico-8 game: Titanic. It's basically the same game scaled down to 1KB of code.

Source code:

1694 characters / 817 tokens / 1023 bytes compressed

w=32h=25r=10cx=0cy=0q=h
cls()
?"\a0l0cx5c2e-gc2e-gdfadfa"
?"\^t\f4▤\n▤\n",16,0
?"\^t\f6█",24,0
?"\^t\f9★웃\fb★웃",32,6
?"\^t\f2██",48,0
?"\^t\ff😐😐",48,0
?"\f3++++",32,4
?"\f9🐱🐱",32,4
memcpy(0,8192*3,8192)
for x=0,w do
for y=0,h do 
l=x%8==3*(y\4)%8 and y<24
i=l and 2 or (x%16==5*(y\4)%16 or y%4==0) and 3 or 0
mset(x,y,i)
end
end
pp={}
for i=1,r do
pp[i]={x=0,y=0,u=0,v=0,t=0,a=128,s=0,c=4}
end
o=pp[1]o.s=1o.c=6
for p in all(pp) do repeat
p.x=rnd(w)\1
p.y=rnd(h)\1
if(p==o)p.y=h-3
i=mget(p.x,p.y)>2 or mget(p.x,p.y+1)>2
until not i end
::_::
cls(12)
q-=1/128
cx=mid(0,cx,w*8-128)
cy=mid(-128,cy,h*8-128)
camera(cx,cy)
rectfill(0,0,w*8,h*8,5)
rectfill(0,q*8,w*8,h*8,1)
poke(12865,4*q)
map()
for p in all(pp) do
x=p.x
y=p.y
u=p.u
v=p.v
s=p.s
t=p.t
f=p.f
p.a=mid(0,p.a+(q<y and -0.5 or 2),128)
if t==0 then
x+=u
y+=v
p.x=x
p.y=y
u=0v=0
mset(x,y,band(mget(x,y),3))
mset(x,y+1,band(mget(x,y+1),3))
if(s<2 and p.a<=0)r-=1s=2?"\a"
if(s<3 and y<-2)s=3?"\a1gb"
e=btn()
f=s==0 and band(e,48)!=0and abs(o.x-x)<=1 and abs(o.y-y)<=2
k={-1,0,1}
if(s==0 and not f)u=rnd(k)v=rnd(k)
if(s==1 or f)u=band(e,2)/2-band(e,1)v=band(e,8)/8-band(e,4)/4 
if(s==3)v=-1
if(s<2 and y<q-1 and not f and mget(x,y+2)<2)v=1
i=x+u
j=y+v
if(mget(i,j)>2 or mget(i,j+1)>2 or i<0 or i>=w)u=0v=0
i=x+u
j=y+v
k=j+1
mset(i,j,bor(mget(i,j),32))mset(i,k,bor(mget(i,k),32))
if(u!=0 or v!=0)t=8
else
t-=1
end
p.u=u
p.v=v
p.t=t
p.s=s
p.f=f
t=1-(t/8)x=x*8+u*t*8y=y*8+v*t*8
if(f)rectfill(x,y,x+7,y+15,7)
spr(p.c+t*2%2,x,y,1,2,u<0,s==2)
if(p==o)cx=x-64 cy=y-64
end
fillp(15420.5*(time()%1>0.5and 1 or -1))
rectfill(0,q*8,w*8,h*8,1)
fillp()
camera()
?"\^x2\*"..o.a\16 .."●",7
?"\^p"..r,64,1
if(o.s>1)?"\^w\^tgame over\a0v0",32,32,8
flip()goto _

Leave a comment

Log in with itch.io to leave a comment.