Nicely made! The trick with memcpy'ing data over to the sprite sheet, and then scaling it up to get the map is really clever.
Play game
1K Pac-Man's itch.io pageCompressed Bytes used
723
Source Code (OPTIONAL)
a=abs r=rect
pal({0,10,8,9,14,13},1)cls(12)r(1,1,6,5,1)r(8,1,13,5)r(3,3,11,10)r(5,5,9,13)r(1,8,5,13)r(9,8,13,13)memcpy(0,24576,16384)s=pset
t=0g=1u=0l={}::_::?'⁶1⁶c'
sspr(0,0,16,16,-4,-4,144,144)q=band
b=btn()h=q(b,2)/2-q(b,1)v=q(b,8)/8-q(b,4)/4if(tp<1and#l<5)add(l,{x=7,y=6,c=0,r=0})p=l[1]
for x=0,16do for y=0,16do
m=sget(x,y)==1if(m)s(x*9,y*9,7)if(p.x==x and p.y==y and m)sset(x,y,0)
end end
t =g
u-=(g-1)/99f=6i=1for o in all(l)do
f =2i =1if t%f<g then
o.x =o.c o.y =o.r
j=p.x k=p.y
if(i==4and a(j-o.x) a(k-o.y)<5)j,k=0,16
if(i>4)j,k=j p.c*3,k p.r*3
if(i>5)j,k=j p.x-l[2].x,k p.y-l[2].y
b=99for c=-1,1do
for r=-1,1do
x=o.x c
y=o.y r
d=a(j-x) a(k-y)-sgn(o.c*c o.r*r)*3if(c==h and r==v)d=-9
if(sget(x,y)<2and a(c r)==1and d<b)b,m,n=d,c,r
end end o.c,o.r=m,n end
h=9k=t/f%1*9x=o.c*k o.x*9y=o.r*k o.y*9if(i<3)w,z=x,y
if(i>2and a(x-w) a(y-z)<6)g=0
circfill(x,y,3,i)d=min(1,u sin(t/9)/7)for e=-d,d,.01do
q=e atan2(o.c,o.r)if(i<3)line(x,y,x cos(q)*4,y sin(q)*4,0)end
if(i>2)r(x-3,y,x 3,y 3)s(x-2,y,7)s(x 2,y,7)
end goto _
Link to Commented Source Code (OPTIONAL)
https://gist.github.com/andymasteroffish/f1c2ff8da83719840e61f59df111cee7
Leave a comment
Log in with itch.io to leave a comment.