The Pico Mermaid

Use (X) to control the Pico Mermaid as she fetches pearls from the bottom of the sea back to the surface. Avoid the piranhas that will swim faster and faster as the mermaid retrieves more pearls.

This is my entry into Tweet Tweet Jam 5 and so the code fits into 560 characters (two tweets).

Features:

  • Single-button controls (X)
  • Animated and multi-colour pixel art sprites*
  • air and water physics*
  • Two particle systems*
  • Difficulty ramp*
  • Score effect*
  • Death effect*
  • start animation*
  • current score and high score display*
  •  in-game instructions*

(* kinda)

Here's the code:

P=pset::A::x=64y=0v=-9t=0w=127e=0d=.6s=0for z=0,29do
poke(z\6*x+z%6+1,'0x'..sub('e0e800800880ce0800444404e008002444043b0000444480b000004088',1+z*2,2+z*2))end::B::P(69,e<1and w or y,7)H=max(s,H)
if(y>119)e=1
?'tAP❎ gET●:'..s..' hI:'..H
v+=.5C=cls
if(y>8)v-=max(btnp(❎)and 2or.4,v-.6)
flip()C(1)rectfill(0,0,w,9,12)t=(t+d)%w
y=min(120,y+v)spr(0,x,y,1,1,t&8<1,e<1)for i=3,14do
d=-d
t=-t
h=40*i-t-4&w
pal(4,i)k=i*8k+=7*sin(h/w)if((h+4)\8==8and 4>abs(k-y-2))C(8)goto A
spr(1,h,k,1,1,d<0)P(rnd(8)+x,h*d%y+3)P(k*d/.7,h\d)end
if(y<9and e>0)e=0s+=1d*=-1.2C(7)
goto B

I've been working on sprite compression routines for PICO-8 to use in another, rather more involved project (so far I have multiple sprite sheets with four 64x64 sprites each,  packed into the extended character set with run length encoding- I'm crazy, ok?) .

When I saw the rules for this jam concerning the character limit and the restrictions regarding resources (none allowed),  a stubborn bit of me wanted to see if I could make a small enough game with sprites anyway. That big hex string in the code is the sprite data. It's not compressed as such since the decompression code would take too many characters compared to the amount saved, but the sprites are still there and the game works (as far as I can tell). I hope it provides a bit of fun too.

Tweak the value of d in the first line to make the fish start swimming faster or slower if it's too hard or too easy. Tweak the 1.2 in the second last line if it's getting harder too fast or too slow for you. Tweak at your own risk - it 's v fragile and prob will break entirely if you so much as sneeze.

:Edit:

Thought I'd got it down to 557 chars to fit into 560 bytes, but it added a bug :(

:Edit2:

This time the change works -  the statement:

e=y>119and 1or e becomes if(y>119)e=1

I did the first version before I knew PICO-8 allowed "if"s without "then"s.

Also, if you're worried that this is too heavy-weight and large a game for you I derived a similar game to fit in a single tweet here: https://drake-blue.itch.io/280-pearls

:Edit3:

v1.0.3 tweak to html container to stop the screen auto-zooming on double-taps when using an iPad (and hopefully other devices).

Development log

Comments

Log in with itch.io to leave a comment.

Very cute fish! It's pretty challenging to get to the bottom and I appreciate the increase in speed for returning to the surface.

Glad you like it :) I figured it was more fun to make the journey back different to the way down.