Pixels Off
Clone of "Lights Out" to try out Usagi engine.
The objective is to turn all the white cells off by clicking on them. Of course, you'll also affect the neighboring cells. When you turn them all off, you get a harder level! (If you can make it past red you're a pro)
HUGE thanks to Sudospective for helping get it under 500!!
c,d,n,r,s,z,m={1,6,15,14,3,13,2,4,12,5,10},0,input,math.random,0,{},function(k,l)for b=1,5 do
i=l*6+k
t=({i-6,i-1,i,i+1,i+6})[b]if t>=0 and t<36 then
z[t]=(z[t]+1)%2
end end end
function _config()return{game_width=5,game_height=5}end
function _init()for x=0,35 do z[x]=0 end end
function _update()if s==0 then s=1 for _=0,d do m(r(4),r(4))end d=d+1 end
if n.mouse_pressed(0)then m(n.mouse())end end
function _draw()s=0
for x=0,35 do
gfx.px(x%6,math.floor(x/6),(1-z[x])*(c[d%12] or 9))
s+=z[x]
end endDownload
Download
main.lua 500 bytes

Leave a comment
Log in with itch.io to leave a comment.