Asteroid Field

Use the up / down to move, button 1 to shoot.

My entry for #TweetTweetJam - make a game where the code is 560 characters or less. 

I used 560 chars

Here's the Pico-8 code:

while(1)do
b={}e=128r=rnd
z=rectfill
n=90s=0y=n
while(y<e)do
q=20+flr(r(n))
if(r(5)<1)add(b,{x=e,y=q,s=q,v=(r(30)-15)/36})
cls()d=31i=0
for h in all{2,36,73,159,243}do
z(0,d,e,e,h)fillp(0xa5a5)z(0,d,e,d+3,h)fillp()d+=17-i
i+=2end
f=btn(4)a=0
if(f and j<1)z(15,y,e,y,10)a=1j=15
if(not f)j=0
z(9,y,14,y-2,8)
if(btn(2))y-=2
if(btn(3))y+=2
for d in all(b)do
d.x-=2
c=d.x
d.y+=d.v
if(y<d.y+6 and y>d.y)then
if(a>0 and c>9)d.y=e s+=10a=0
if(c>9 and c<14)y=e
end
?"◆",c,d.y,10
if(d.x>-999)pset(c/3+n%e,d.s%20,7)pset(c/4+n%e,d.s%18,5)
end
j-=1
?s,60,0,8
flip()
end
end


StatusReleased
PlatformsHTML5
Rating
Rated 4.0 out of 5 stars
(2 total ratings)
AuthorNerfboy
GenreAction
Made withPICO-8
TagsArcade, PICO-8, tweettweetjam

Leave a comment

Log in with itch.io to leave a comment.