Earth Shield 20XX
warning: contains flashing images, may not be suitable for sensitive people
Defend the (square) earth from missiles! Set the earth's shield to the same polarity as the incoming missile to block it!
Controls: X to switch shield polarity
Source:
r=rectfill e=pset s={}c=0l=0o=1n=30h=10p=0a={} for i=1,100do add(a,{rnd(127),rnd(127)})end ::_:: cls()t=time()dt=t-p if l<=0 then ?"earth shield 20xx",30,56,11 ?" hit ❎ to start",30,68,8 if(btnp(5))l=5c=0 else for i=1,#a do e(a[i][1],a[i][2],5)end r(60,60,68,68,12)rect(56,56,72,72,7+o)d={60,62,61,62,60,63,61,63,62,64,63,65,62,66,65,62,66,62,65,63,66,63,67,64,66,65,67,65,68,65} for i=1,#d-1do e(d[i],d[i+1],11)end if h<0then cf=flr(rnd(2)) x=flr(rnd(128)) y=flr(rnd(128)) if cf==1 then x=flr(rnd(2))*128 else y=flr(rnd(2))*128 end v={64-x,64-y} add(s,{x=x,y=y,v=v,pol=cf+7})h=n end if(t%10==0 and n>=10)n-=3 for _,i in pairs(s) do e(i.x,i.y,i.pol)i.x=i.x+dt*i.v[1]i.y=i.y+dt*i.v[2]i.v={64-i.x,64-i.y} if((i.x>=56 and i.x<=72)and(i.y>=56 and i.y<=72))then if(i.pol==7+o)then c+=1 poke4(12800,2571.2472)sfx(0) else cls() r(0,0,127,127,7) l-=1 poke4(12800,2471.2472)sfx(0) end del(s,i) end end if(btnp(5))o=(o+1)%2 ?"score: "..c.."\nlife: "..l,12 p=t h-=1 end flip() goto _
Comments
Log in with itch.io to leave a comment.
There's a really nice rhythm to this, it builds up into a really satisfying flow!
Like it a lot! Tricky gameplay and nice design!
this is neat and the presentation's so nice :3 got about 70 pts
Great game - very compelling & fried my brain bit too while on auto-pilot! 👍
(I was on a roll for a massive score, but alas, lost it when I panicked-pressed at the end)
TIP: Might be easier on players to actually use the X key with BTN(5) - as you're currently mixing buttons by saying "Press X", when BTN(4) == 🅾️ in PICO-8, not X.
(Try the gamepad/input tester, just to the right of your game screen above to confirm)
Thanks! I've changed the input to X, that's way clearer :)