Impending
Impending
Pico-8 500 Byte entry into the #TweetTweetJam 8.
Features:
- Smaller asteroids move faster than big ones.
- Adds 1 extra asteroid to increase difficulty every 20 seconds.
- Automatically restarts game after 5 seconds on "game-over" screen.
- All math is in angles and radii, with the character as the origin point (to reduce code).
- Holding down X button results in rapid-fire at an appropriate rate (uses poke btnp repeate rate).
Uses less than 500 characters to implement a basic arcade-like game (no external images or sound files allowed, everything is part of the code).
v=64l={}b={}a=0poke(24413,15)function q(o)circ(v+cos(o.a)*o.r,v+sin(o.a)*o.r,o.s,o.c)end::_::cls()for c in all(l)do q(c)for o in all(b)do z=abs(c.a-o.a)if(z<.2and o.r<c.r)then if(c.r^2+o.r^2-2*c.r*o.r*cos(z)<16+c.s^2)c.s-=1.5del(b,o) if(c.s<5)del(l,c)end q(o)o.r+=o.s/#l if(o.r>v)del(b,o)end c.r-=2/c.s if(c.r<9)print("\^8")run()end circ(v,v,4,7)q({a=a,r=5,s=1,c=12})p=btn()a=(a+(p%2-p\2%2)*.02)%1if(btnp(5))add(b,{a=a,r=5,s=1,c=12}) if(#l<3+t()\20)add(l,{a=rnd(1),r=78,s=rnd(8)+5,c=9}) flip()goto _
Leave a comment
Log in with itch.io to leave a comment.