Avoider
This game was made in a few hours for the #TweetTweetJam
In 558 characters, features include:
- Player Sprite
- Asteroid Sprite Generation
- Sprite Drawing
- Collision Detection
- Colors
- Score
- Vertical Clamping
Code for PICO-8 0.1.11G:
n=9y=64s=0p={s={{-6,-6},{-2,0},{-6,6},{6,0}}}a={}q=all function k(t,f,v)line(t.x+f[1],t.y+f[2],t.x+v[1],t.y+v[2])end function o(t)f=nil for v in q(t.s)do if f then k(t,l,v)else f=v end l=v end k(t,l,f)end::_::r=rnd if(btn(2))y-=2 if(btn(3))y+=2 y=max(0,min(127,y))c=color if#a<n then w={x=127+r(255),y=r(127)}add(a,w)w.s={{1,1},{1,-1},{-1,-1},{-1,1}}for v in q(w.s)do v[1]=v[1]*r(8)v[2]=v[2]*r(8)end end cls()c(11) ?s p.x=9 p.y=y c(8)o(p)c(4)for v in q(a)do v.x-=1if(v.x<0)del(a,v)s+=1n+=0.2 o(v)if 6>abs(v.x-9)and abs(v.y-y)<6then stop()end end flip()goto _
Up to date source code can be found here.
Comments
Log in with itch.io to leave a comment.
Got 316! Nice relaxing pace, and great use of a simple vector aesthetic!