1K Wall Dash #Pico1K
1K Wall Dash
Move from wall to wall and collect all coins to advance to next level. You have to think fast as there's a time limit. Game starts with 60 seconds remaining. When you complete a level you are given 30 extra seconds.
Very important: if you press fire, the player inmediately goes back to the starting point. This is very useful to get to unreacheable coins or when you get locked. It's likely that those few remaining coins can only be reached from the starting point.
A game in 1013 Compressed Bytes of code for PICO-1K Jam 2024 #Pico1k
Features:
- Random maze generator, always solvable.
- Number of coins increases with level.
- Very fast movement. There's no time to waste!
- Dynamic camera.
- Simple animations for coins and main character.
Controls:
- Left/Right/Up/Down: dash from wall to wall.
- Fire: go back to starting point.
Code:
_set_fps(60)h=0o=1n=1s=0l=100k=150r=60::s::poke(24405,0)cls()pal(1,0,1) for j=0,255do a=j%16*16b=j\16*16 for i=1,9do rectfill(a+rnd(16),b+rnd(16),a+rnd(16),b+rnd(16),1) end end poke(24405,0x60)pal(1,1,1)cls()flip() memcpy(0x8000,0,0x2000) for j=1,9do memcpy(0,0x8000,0x2000) x=rnd(128)\1y=rnd(128)\1m=0p={{x=x,y=y}} while#p>0do q=p[#p]p[#p]=nil if sget(q.x,q.y)==1do sset(q.x,q.y,2)m+=1 for e=0,1,.25do a=cos(e) b=sin(e) c=q.x d=q.y while sget(c+a,d+b)>0do if(sget(c,d)==1)sset(c,d,3)m+=1 c+=a d+=b end if(sget(c,d)!=2)add(p,{x=c,y=d}) end end end if(m==mid(m,l,k))break end if(m!=mid(m,l,k))l=max(50,l-50)goto s u=x v=y z=0w=0c=0d=1b=0a=0::_::cls(1) z=(z-.5)*.8+.5 w=(w-.5)*.8+.5 if o==0do r=max(r-1/60)if(a|b==0)a=btn()\2%2-btn()%2b=btn()\8%2-btn()\4%2 if(a!=0and b!=0)b=0a=0 if a|b!=0do d=min(d+.2,8) e=d while e>0do if c>0do f=min(c,e) c-=f e-=f z+=f*a w+=f*b end if c==0do if(sget(x,y)>=2)sset(x,y,1)s+=1m-=1?"\ai5s2e" if(m==0)o=2n+=1l+=50k+=50r+=30goto s if sget(x+a,y+b)==0do b=0a=0c=0d=1e=0else c+=8x+=a y+=b end end end else if(btnp(4))z+=(u-x)*8w+=(v-y)*8x=u y=v end end for j=-16,16do for i=-16,16do e=sget(x+i,y+j)if e==0do rectfill(i*8+a*c+z\1+60,j*8+b*c+w\1+60,i*8+a*c+z\1+67,j*8+b*c+w\1+67,5) elseif e>1do ovalfill(i*8+a*c+z\1+64-2.2*sin(t()),j*8+b*c+w\1+61,i*8+a*c+z\1+64+2.2*sin(t()),j*8+b*c+w\1+66,sin(t())>0and 8or 9) end end end ovalfill(z\1+60,w\1+60,z\1+67,w\1+67,11) ovalfill(z\1+61,w\1+61,z\1+63,w\1+65,7) ovalfill(z\1+64,w\1+61,z\1+66,w\1+65,7) pset(z\1+62+a,w\1+63+b,1) pset(z\1+65+a,w\1+63+b,1) if o==0do if(r==0)o=3 for i=0,1,.25do ?"⧗"..r\1,cos(min(.75,i))+1,sin(i)+1,i\1*7 ?"s:"..s ?"h:"..h ?"l:"..n end elseif o==1do for i=0,1,.25do ?"\^w\^hwall dash",cos(min(.75,i))+32,sin(i)+32,i\1*12 ?"\nh:"..h end if(btnp(4))o=2 elseif o==2do for i=0,1,.25do ?"\^w\^hlevel "..n,cos(min(.75,i))+32,sin(i)+32,i\1*11 ?"\n⧗"..r\1 ?"\ns:"..s ?"\nh:"..h end if(btnp(4))o=0 elseif o==3do h=max(h,s) for i=0,1,.25do ?"\^w\^hgame over\n",cos(min(.75,i))+32,sin(i)+32,i\1*14 ?"⧗"..r\1 ?"s:"..s ?"h:"..h ?"l:"..n end if(btnp(4))o=1n=1s=0l=100k=150r=60goto s end flip()goto _
Comments
Log in with itch.io to leave a comment.
This is a legitimately fun, cool little game. Nice job! As the fellow maker of a game with a googly-eyed colored-sphere protagonist, I approve of your easy-to-animate strategy ;)