Log In  


Perfect 100

A grid hopping game. Fill the grid counting from 0 to 99.

Cart #perfect100-0 | 2025-06-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA


The goal of the game is to fill in the cells of the grid with numbers going from 0 to 99 to form a Perfect matrix of 100. The rules are simple: move vertical, horizontal or diagonal skipping 2 cells (horizontal or vertical) or 1 cell (diagonal).

The green cursor lets you select your next move. Press the 1st button to cycle between choices, press the 2nd button to confirm the move.

Restart the game if you get stuck and can't move.

Can you reach 99? :P

I made this for the #TweetTweetJam 10 on May 2025. It is written in Pico-8 and the code is 500 characters long. Credit to https://thisismypassport.github.io/shrinko8/ for an excellent tool to shrink the code.

Code:

n=10_={63,51,30,11,3,15,36,55}function _init()d={}for n=0,9do d[n]={}end r,i=rnd(n)\1,rnd(n)\1d[r][i]=0c,o=1,1t()end function t()f={}if(a)return
for o=1,8do e,u=r+_[o]\n-3,i+_[o]%n-3if(not(e<0or e>=n or u<0or u>=n or d[e][u]))add(f,e*n+u)
end if(o>#f)o=1
end function _update()if(a)return
if(btnp(4))o=o%#f+1
if(btnp(5)and f[o])r,i=f[o]\n,f[o]%n d[r][i]=c a=c==99c+=1o=1t()
end function _draw()cls()for o=0,9do for f=0,9do?d[o][f]or"_",o*n,f*n,7
end end if(not a and f[o])?"█",f[o]\n*n,f[o]%n*n,3
end

And here's the code before shrinking it with the shrinko8:

w=10
f={63,51,30,11,3,15,36,55}
function _init()
 g={}
 for i=0,9 do g[i]={} end
 p,q=rnd(w)\1,rnd(w)\1
 g[p][q]=0
 c,l=1,1
 t()
end
function t()
 m={}
 if (u) return
 for i=1,8 do
 z ,r =p+f[i]\w-3,q+f[i]%w-3
 if (not(z<0 or z>=w or r<0 or r>=w or g[z][r])) add(m,z*w+r)
 end
 if (l>#m) l=1
end
function _update()
 if (u) return
 if (btnp(4)) l=l%#m+1
 if (btnp(5) and m[l]) p,q=m[l]\w,m[l]%w g[p][q]=c u=(c==99) c+=1 l=1 t()
end
function _draw()
 cls()
 for i=0,9 do
 for j=0,9 do
 ?g[i][j] or "_",i*w,j*w,7
 end
 end
 if (not u and m[l]) ?"█",m[l]\w*w,m[l]%w*w,3
end


1


Nice puzzle. Reminded me of the knight's tour.
Maybe add a cart in your post so splore users have a chance to see it ?


Hey, thanks for writing and congratulations on winning the game! Well done!

It is the same game the knight's tour indeed, just different movement rules. I don't know who created these rules, we used to play this game on a piece of paper in school when I was a child.

Thanks for the tip about embedding the cartridge. I thought I did! It is the first time for me writing a Pico8 game and publishing it here so I don't know what I'm doing.



[Please log in to post a comment]