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

MAG1K-EYEView project page

A PICO-8 Autostereogram creator made in < 1K of code (for #Pico1k Jam)
Submitted by Paul Nicholas (Liquidream) (@Liquidream) — 19 days, 23 hours before the deadline
Add to collection

Play tool

MAG1K-EYE's itch.io page

Compressed Bytes used
938

Source Code (OPTIONAL)
function _init()palt(0,false)𝘣=0c=4g=20s=g*2.5a=1/3j=5𝘤=3n=1x=1i=true poke(24365,1)w()end function _update60()l=peek(24448)r=false if(btnp(❎))i=not i r=true
if(l==1and not i)i=true r=true
if(l==4and i)i=false r=true
if r then if(i)memcpy(0,32768,8192)w()else memcpy(32768,0,8192)m()
end if(i)p()else q()
poke(24448,0)end function b()if(l==5)extcmd"screen"
end n=1e=5function w()pal(15,0)?"⁶!5f100█ˇ5●?70☉"
end function p()f=stat(32)d=stat(33)if(btnp(➡️))e+=1
if(btnp(⬅️))e-=1
e=mid(3,e+stat(36),20)if(btnp(⬆️))n+=1
if(btnp(⬇️))n-=1
n=mid(n,6)if(l==2)x=1
if(l==3)x=2
if(btnp(🅾️)or l==6)memcpy(32768,0,8192)poke(24405,0)memcpy(0,40960,8192)poke(24405,96)memcpy(40960,32768,8192)
if(l==7)poke(24405,0)cls()poke(24405,96)
if stat(34)>0then if stat(34)>1then n=sget(f,d)else if(not h)h=true memcpy(40960,0,8192)
u=true poke(24405,0)if(x==1)circfill(f,d,e,n)else rectfill(f-e,d-e,f+e,d+e,n)
poke(24405,96)end else if(h)h=false
u=false end spr(0,0,0,16,16)b()if(x==1)circfill(f,d,e,n)circ(f,d,e,u and 6or 8)else rectfill(f-e,d-e,f+e,d+e,n)rect(f-e,d-e,f+e,d+e,u and 6or 8)
?n,f-1,d-2
end function m()v=flr(rnd(15))-15for e=1,6do pal(e,e+v,1)end y(j)end function q()spr(0,0,0,16,16)b()end function y(e)if(e<2)e=2
if(e>16)e=16
local n,f,d=k(0)for d=0,127do o={}for e=0,127do o[e]=e end for i=0,127do local n=sget(i,d)if(n>8)n=8
n=n/c local f=k(n)local e=flr(i-f/2)local f,t=e+f,false if 0<=e and f<128then t=false local l=1while true do local e=n+2*(2-a*n)*l/(a*s)z=sget(flr(i-l),d)/c 𝘢=sget(flr(i+l),d)/c t=z<e and 𝘢<e l+=1if(not t or e>=1)break
end if t then local n=o[e]while n~=e and n~=f do if(n<f)e=n n=o[e]else o[e]=f e=f n=o[e]f=n
end o[e]=f end end end for n=127,0,-1do if(o[n]==n)sset(n,d,rnd(e))else sset(n,d,sget(o[n],d))
end end poke(24405,0)circfill(64-n/2,123,3,0)circfill(64+n/2,123,3,0)poke(24405,96)end function k(e)return flr((1-a*e)*s/(2-a*e)+.401)end

Link to Commented Source Code (OPTIONAL)
https://paste.lol/liquidream/mag1k-eye.lua

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet