Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Nono 1kView game page

Simple nonogram in <1024 compressed bytes of code in Pico 8
Submitted by NuSan โ€” 20 days, 3 hours before the deadline
Add to collection

Play game

Nono 1k's itch.io page

Compressed Bytes used
964

Source Code (OPTIONAL)
poke(0x5f2d,1)function a(i,y,o)n={}c=0for j=1,x do
if(y>0and g(i+o,j)or g(j+o,i))%2>0then
c+=1elseif c>0then
add(n,c)c=0end
end
if(c>0)add(n,c)
return n
end
x=10u=1v=1y=35m,g,b,p,z=mset,mget,btn,btnp,{1,3,1,13,11,13}function t()s=12-x/2.5r=1for i=1,x do
for j=1,x do
m(i+64,j,rnd()>y/99 and 1 or 0)m(i,j,0)end
end
end
function f(e)x=mid(5,15,x+((e&2)\2-(e&1)))t()menuitem(1,"size "..x,f)end
function f1(e)y=mid(10,60,y+(e&2)\2-(e&1))t()menuitem(2,"difficulty "..y,f1)end
f1(0)f(0)::_::cls(1)
if(p(0))u-=1
if(p(1))u+=1
if(p(2))v-=1
if(p(3))v+=1
if px!=stat(32) or py!=stat(33) then
u,v=(stat(32)-30)\s,(stat(33)-30)\s
end
if(b(4)and not p4 or stat(34)%2==1and not m1)h=g(u,v)==1and 0or 1
if(b(5)and not p5 or stat(34)\2==1and not m2)h=g(u,v)==2and 0or 2
w=1u=mid(1,x,u)v=mid(1,x,v)
if(r<1)u=-9v=-9
for i=1,x do
d=i*s+30n,q=a(i,1,64),a(i,1,0)for k=1,#n do
if(n[k]!=q[k])w=0
?n[k],d+4-#tostr(n[k])*2,28-#n*6+k*6,(n[k]==q[k] and #n>=#q)and 6or 7
end
for j=1,x do
e=j*s+30
if i==1 then
n,q=a(j,0,64),a(j,0,0)for k=1,#n do
if(n[k]!=q[k])w=0
?n[k],32-#n*6+k*6-#tostr(n[k])*2,e+2,(n[k]==q[k] and #n>=#q)and 6or 7
end
end
if((b(4)or b(5)or stat(34)>0)and r>0and i==u and j==v)m(i,j,h)
rectfill(d,e,d+s,e+s,z[g(i,j)+(((i==u or j==v or r<1))and 4or 1)])
c=((i==u or j==v or r<1))and 8or 4
if(g(i,j)==2)line(d,e,d+s,e+s,c)line(d,e+s,d+s,e,c)
rect(d,e,d+s,e+s,5)end
end
for i=1,x+5,5 do
d=s*min(i,x+1)+30
rect(d,30+s,d,30+x*s+s,6)
rect(30+s,d,30+x*s+s,d,6)
end
if w>0then?"\^#\^tvictory",6,14+sin(time()/2)*4.5,58
if not b(4) and stat(34)%2!=1 then
if r<1 and (p4 or m1)then
t()else
if(r==1)?"\as9x5c1egc2egc3egc4"
r=0end
end
end
d=u*s+30e=v*s+30p4=b(4)p5=b(5)rect(d,e,d+s,e+s,8)
px,py,m1,m2=stat(32),stat(33),stat(34)%2==1,stat(34)\2==1
pset(px,py,7)
flip()goto _

Leave a comment

Log in with itch.io to leave a comment.

Comments

HostSubmitted

Very cool.
Not gonna lie - I totally had to look up the rules to nonogram/picocross (and I'm still not sure I got it right). BUT, it's impressive how much you crammed into 1K.
Nice entry! ๐Ÿ˜‰๐Ÿ‘