Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Alien PillarsView game page

Activate the five defensive pillars to stop the alien invasion.
Submitted by lumbar527 — 9 days, 16 hours before the deadline
Add to collection

Play game

Alien Pillars's itch.io page

Compressed Bytes used
952

Source Code (OPTIONAL)
function _init()o={x=0,y=0,z=0,a=0,h=5}d={}r={}l={}for n=0,10,2do for e=0,10,2do c=rnd(4)+4j=#d add(d,{x=n*10,y=e*10,z=0})add(d,{x=n*10,y=e*10,z=c,#d})add(d,{x=n*10+10,y=e*10,z=0,#d-1})add(d,{x=n*10+10,y=e*10,z=c,#d,#d-1})add(d,{x=n*10+10,y=e*10+10,z=0,#d-1})add(d,{x=n*10+10,y=e*10+10,z=c,#d,#d-1})add(d,{x=n*10,y=e*10+10,z=0,#d-1,j+1})add(d,{x=n*10,y=e*10+10,z=c,#d,#d-1,j+2})add(l,{x=n*10+5,y=e*10+5})add(r,{x=rnd(110),y=rnd(110),z=0,h=2})end end for n=1,5do add(d,{x=rnd(110),y=rnd(110),z=0})add(d,{x=d[#d].x,y=d[#d].y,z=10,-2,#d})end y=5𝘣=0end function _draw()if(btn(0))n(.01)
if(btn(1))n(-.01)
if(btn(2))k(1)
if(btn(3))k(-1)
if(o.h<=0)run()
cls()i={}for e in all(d)do a,u=h(e.x,e.y,e.z,o.x,o.y,o.z)for n in all(e)do if n==-2do if(e.x^2+e.y^2<25and e.z>0)y-=1e.z=0
pal(5,10)else if#i>=n do if i[n][1]==f and i[n][2]==f or a==f and u==f do m=(e.y-d[n].y)/(e.x-d[n].x)if e.x>0do if(d[n].x<0)w=m*-d[n].x+d[n].y b,g=h(1,w,d[n].z,o.x,o.y,o.z)if(e.x<40)line(a,u,b,g,5)
else if(d[n].x<0)w=m*-e.x+e.y b,g=h(1,w,e.z,o.x,o.y,o.z)if(d[n].x>40)line(i[n][1],i[n][2],b,g,5)
end else if(d[n].x<40and e.x<40)line(a,u,i[n][1],i[n][2],5)
end end end end add(i,{a,u})pal()end for n in all(r)do p=0z=n.x x=n.y if n.x>2do n.x-=.1elseif n.x<-2do n.x+=.1else p=1end if n.y>2do n.y-=.1elseif n.y<-2do n.y+=.1else if(p==1)o.h-=1n.h-=1
end for e in all(l)do if((e.x-n.x)^2+(e.y-n.y)^2<25)n.x=z n.y=x
end 𝘢,s=h(n.x,n.y,n.z,o.x,o.y,o.z)q,e=h(n.x,n.y,n.z+2,o.x,o.y,o.z)if((𝘢~=f or s~=f or q~=f or e~=f)and n.x<40)sspr(0,0,8,8,q-(s-e)/2+2,e+2,s-e,s-e)
if(n.h<=0)del(r,n)
end?o.h,0,0,8
?y,0,6,10
if(y==0)cls()o.h=10?"you won",0,0,1
end function h(n,d,o)local e=sqrt(n^2+d^2)if(e==0)e=1
local d=-v(n,1,d)*64if(n<1)return f,f
local n=-v(e,1,o)*64return d+63,n+63end function v(n,e,d)if(n==0)return d*e
return d*e/n end function n(e)o.a+=e for n in all(d)do local d,o=sqrt(n.x^2+n.y^2),atan2(n.x,n.y)local e=o+e n.x=cos(e)*d n.y=sin(e)*d end for n in all(r)do local d,o=sqrt(n.x^2+n.y^2),atan2(n.x,n.y)local e=o+e n.x=cos(e)*d n.y=sin(e)*d end for n in all(l)do local d,o=sqrt(n.x^2+n.y^2),atan2(n.x,n.y)local e=o+e n.x=cos(e)*d n.y=sin(e)*d end end function k(n)for e in all(l)do e.x-=n end for e in all(l)do if(e.x^2+e.y^2<25)for e in all(l)do e.x+=n end return
end for e in all(d)do e.x-=n end for e in all(r)do e.x-=n end end

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted(+1)

Nice renders! Interesting concept, though sometimes it's hard for me to tell if I'm facing a wall or a hallway.

Submitted(+1)

This is a wild rendering setup! Good job!