Play game
Hunter_1k's itch.io pageCompressed Bytes used
1024
Source Code (OPTIONAL)
function _init()
if(x==nil)?"\asfl0fi5c1>d#<.fd.g.c2c1.c.cd.cd#.f"
x=64y=64k={}q={}h=6z=5w=c(7,6,4)f=c(15,5,3)u=c(5,2,9)i=c(3,3,5)o=c(6,4,2)p=c(1,1,6)v=t()n=v
end
function _update()
if h>0 and #o>0 then
p[1][1]=x
p[1][2]=y
if(btn(o))x-=.8
if(btn(1))x+=.8
if(btn(2))y-=.8
if(btn(3))y+=.8
r(u,p,-.5)r(i,p,-.5)r(o,p,.5)r(q,p,-.8)r(u,o,-.15)r(i,o,-.15)r(q,o,-.15)
if(t()-v>2 and z<5) z+=1 v=t()
end
end
function _draw()
ak=false cls(5)circfill(64,64,128,1)camera(x-64,y-64)
if(btnp(5))at()
for i in all(k) do dm(i[5],i[1],i[2],i[6]) end
if(h>0)l("\*"..h.."β₯", x-63,y-60,14)
if(z>0)l("\*"..z.."β", x-63,y-53,13)
l("π±: "..#o,x+16 ,y-60 , 2)
if(#o<=0)cls(1)l("β
success", x-19,y-6,7)e()
if(h<=0)cls(1)l("π± game over",x-32,y-6,8)e()
end
function e()if(btnp(4))_init()end
function at()
if z>0 then
circfill(x+3,y+3,14,5)
?" β\nβ β\n β",x-6,y-6,6
?'\as4x5c1egc2egc3eg'
z-=1ak=true
end
end
function m(x,y,s,c)
return {x,y,0,0,s,c}
end
function c(n,s,c)g={}
for i=1,n do add(g,m(rnd(200)-32,rnd(200)-32,s,c)) add(k, g[i]) end
return g
end
function r(al,bl,g)
for i=1,#al do
fx=0fy=0
for j=1,#bl do
a=al[i]b=bl[j]
dx=a[1]-b[1]
dy=a[2]-b[2]
d=sqrt(dx*dx+dy*dy)
if d>0 and d<40 then
if(bl==p and ak and d<20)del(al,a) del(k,a) return
if(bl==p and d<8)h-=1 del(al,a) del(k,a) return
if(al==o and t()-n>1)add(k,add(q,m(a[1],a[2],7,9)))n=t()
f=g*1/d
fx+=f*dx
fy+=f*dy
end
end
a[3]=(a[3]+fx)*.5
a[4]=(a[4]+fy)*.5
a[1]+=a[3]
a[2]+=a[4]
if(a[1]<=10 or a[1]>=118)a[3]*=-1
if(a[2]<=10 or a[2]>=118)a[4]*=-1
end
end
function dm(s,...)
vs=({'\^.βΈγ>]]ββ6\viβ
','μ\viπ±','π±\f9\vmβ','\^.βΈγ>]]ββ6\veπ±','Λ\|f\f8\vmΛ','\^.g<>γγ<nw\f3\vmβ€','β'})[s]
l(vs,...)
end
function l(s,...)
for i in all(split'\|f\f0,\|h\f0')do?i..s,...
end
?s,...
end
Leave a comment
Log in with itch.io to leave a comment.
Comments
Well done on your first Pico-8 entry. The characters look great, and there is a surprising amount of strategy in evading enemy attacks. Great work!
Thank you, I could have reduced the art and sound a bit to go for more gameplay dynamics. the way it was set up was based on emergent behavior, like those found in the game of life, you create characters and then define the interactions between them and the game sorts it out. the the behavior in this case is just move towards or away. I may have to revisited this later, it was fun seeing when not limited to 1k.