Yarr! There be a treasure on these isles! Only the bravest triangulators can find!

## Controls:

• Arrow keys to move
• Z or C to dig and find out how faraway the treasure is.

## Goal:

• Find the treasure (X mark the spot!) by digging around.
• For added challenge, find the treasure in 3 or less digs!

## Code

Game (549 chars):

```n,r=circfill,rnd
cls(15)for i=0,30do
a=r()l=r(48)c=cos(a)*l+63s=sin(a)*l+63n(c,s,r(8)+8,9)end
for i=0,9999do
x=r(128)y=r(128)for e=0,.9,1/4do
j=pget(x+cos(e),y+sin(e))
if(j!=9)n(x,y,1,j>9and 15)end
end
memcpy(0,24576,7^5)g=9f=9d=9t=0q={}::_::p=btn()g+=(p&2)/2-(p&1)f+=(p&8)/8-(p&4)/4
for z in all(q)do
circ(z,z,z,7)end
if(#q>3)deli(q,1)
if(t%3<1)sset(g,f,8)
flip()spr(0,0,0,16,16)t+=1
if(d>3)goto _
for j=-1,1do
for k=-1,1do
c+=j
s+=k
line(c-5,s-5,c+5,s+5,8)line(c-5,s+5,c+5,s-5)end
end::w::goto w```

Original Tweetcart (274 chars):

```cls(15)for i=0,30do
a=rnd()l=rnd(48)c=cos(a)*l+63s=sin(a)*l+63circfill(cos(a)*l+63,sin(a)*l+63,rnd(8)+8,9)end::_::if t()<.4then
x=rnd(128)y=rnd(128)o=flr(rnd()*4)/4for e=0,.9,1/4do
j=pget(x+cos(e+o),y+sin(e+o))
if(j!=9)circfill(x,y,1,j>9and 15)end
else
?"⁙",c,s,8
end
goto _
```

## Difficulty

To modify the game's difficulty (Normal default), swap out this line of code:

```EASY
NORMAL
HARD
EXTREME

 Status Released Platforms HTML5 Rating (13) Author Munro Genre Puzzle Made with PICO-8 Tags 2D, PICO-8, Pirates, Pixel Art, Procedural Generation

Nice! Great concept, really well done visuals.

This is so fun for a small amount of code. Very nice work!

Thank you!

Map generation looks great. It'd be cool if the X wasn't always on the circle, it kind of makes it too easy to locate.

It seems like the X is always on land, which is pretty cool.

thanks for the feedback. I removed some vestigial code and was able to add a randomized amount to the radius and a limit of 3 beacons at once. should make the game much tricker!

Very cool! Now it feels a lot more like triangulating the treasure.

This is great (and fun to play!). Love the tattered map effect! 😉

Thanks! That actually was a happy accident when making the original!

Love this! Visuals are absolutely spot on, excellent entry!

Thanks!

(1 edit)

Wow, the visuals are great for a tweetcart!

Thanks! It's a surprisingly effective yet simple technique for generating coastlines.