Stack 3D (TweetTweetJam 7)
Stack the boxes keeping them aligned. A game in 557 characters of code for TweetTweetJam 7.
Controls: Fire to drop the box
PICO-8 Source Code:
_set_fps(60)h=0m=64n=32r=rect::s::p={{0,0,m,m}}e=1u=0v=2g=0::_::cls() if(e>0)u,v=v,u q=p[#p]add(p,{q[1]-m*u,q[2]-m*v,q[3],q[4]})e=0s=#p-2 ?s ?h g+=(n+n*#p-g)/9for i=1,#p do q=p[i]a=q[1]b=q[2]c=q[3]d=q[4]f=g-n*i+(a-b)/2 if f<128then for j=0,c+d do k=c+d-j l=c-d t=a+b+j k,l=min(j,k+l)/2,min(j,k-l)/2r(t,f+k,t,f+k+n,2+(j<c and i+4or i+8)%14)r(t,f-l,t,f+k,2+i%14)end end c+=a d+=b if i==#p then q[1]+=u q[2]+=v if(btnp(4))e=1q[1]=max(a,x)q[2]=max(b,y)q[3]=min(c,z)-q[1]q[4]=min(d,w)-q[2] if(q[3]<8or q[4]<8)h=max(s,h)goto s end x,y,z,w=a,b,c,d end flip()goto _
Comments
Log in with itch.io to leave a comment.
truly artistic, sorry for spamming your games with comments :D This one controls great. And very "outside the box" for a 500char game.
Thanks! When I finished coding this game, I couldn't believe I had packed so much in so little code. And the game didn't feel like a standard 500 char game.
Excellent!
The loose condition is not totally clear though/
Thanks! You're right, you never know how close you are to minimum dimensions. I could have set 1x1 instead of 8x8 but very thin boxes looked a bit weird.