This is just a simple shmup (shoot 'em up) game made in 492 characters of PICO-8 Lua code.

Instructions

  • Left/Right arrow keys to move side-to-side
  • Z-key or A button to shoot
  • Don't get hit by a meteor!

Code

x=64b={}e={}g=true s=0::_::cls()
if g then
 x+=btn(1)and 2 or 0
 x-=btn(0)and 2 or 0
 if(btnp(4))add(b,{x=x+1,y=120})
 if(rnd()<.02)add(e,{x=rnd(128),y=0})
 for i in all(b)do
  i.y-=4 rect(i.x,i.y,i.x+1,i.y+3,7)
  if(i.y<0)del(b,i)
 end
 for m in all(e)do
  m.y+=1 circ(m.x,m.y,3,8)
  for i in all(b)do
   if(abs(i.x-m.x)<4 and abs(i.y-m.y)<4)del(e,m)del(b,i)s+=1
  end
  if(abs(m.x-x)<4 and abs(m.y-120)<4)g=false
 end
 rect(x,120,x+3,123,12)
 ?s
else
 ?'game over',45,60,8
end
flip()goto _

Download

Download NowName your own price

Click download now to get access to the following files:

shmup.p8 17 kB

Leave a comment

Log in with itch.io to leave a comment.