Collect resources from asteroids and hire workers to convert resources to money! This is entry for pico jam 1k.

Controls

  • left and right to control gun
  • z next item in shop
  • x buy item in shop

Shop items

  • Workers for converting resources to money
  • Heart increase recovering of your station
  • Dots upgrades gun
  • Eye makes your gun fully automatic

Source code (1006 bytes compressed)

j=15function _init()e=30i=100l=30k={f=64,i=128}a=0c={}d=.001w=64n={e=.1,f=64,i=128,o=0,r=0,t=0}u={}o={}s=6400h=0m=0p=.001q={{n="웃",d=30,c=10,u=function()add(c,{f=64,i=128,o=.25,r=0,d=chr(137)})end},{n="β™₯",d=20,c=10,u=function()p+=.001end},{n="…",d=30,c=20,u=function()w=flr(w*.9)d+=.0002end},{n="β˜‰",d=200,c=1,u=function()n.t=d 𝘀=true end},{n="win",d=999,c=1,u=function()j+=5print"⁷sfx5cgefgcgfefg"_init()end}}end function π˜₯()x=4+rnd(5)r={h={},o=rnd(1),r=.1+rnd(1),f=rnd(128),i=-rnd(128),s=x}for n=1,10do local e=x+rnd(x/2)-x/4add(r.h,{e=n*.1,a=e})end add(r.h,{e=r.h[1].e,a=r.h[1].a})add(o,r)end function _update60()a+=1if(#o<j)π˜₯()
if(i<0)_init()
if(i<100)i+=p
if(a%60==0and h-#c>0)s+=#c h-=#c
if(𝘀)if n.e<=0then n.t=d elseif n.e>=.5then n.t=-d end else n.t=0
if(btn(⬅️))n.t=d
if(btn(➑️))n.t=-d
g(n)n.e=mid(0,n.e+n.t,.5)if(a%w==0)add(u,{f=64+e*cos(n.e),i=128+e*sin(n.e),o=cos(n.e),r=sin(n.e)})
end function _draw()cls()foreach(o,𝘦)fillp(15*16^flr(a/10%4))v=12if(l>0or i<=50)l-=1v=rnd(16)
circfill(64,128,e,v)fillp()circfill(64,128,e-6,0)foreach(c,𝘧)circ(64+e*cos(n.e),128+e*sin(n.e),4,8)foreach(u,𝘨)if(btnp(πŸ…ΎοΈ))m+=1
f=q[m%#q+1]print("β™₯"..flr(i),0,90,15)print("β–‘"..h)print("$"..s)print(f.n.."$"..f.d,10)if(btnp(❎)and f.d<s and f.c>0)s-=f.d f.u()f.c-=1print"⁷sfx5c1c2c3"
end function 𝘨(n)circfill(n.f,n.i,1,8)g(n)y(n,u)end function y(n,e)if(b(n,k)>200)del(e,n)
end function 𝘧(n)print(n.d,n.f,120,15)g(n)if(n.f<40or n.f>80)n.o=-n.o
end function 𝘦(n)for e in all(n.h)do 𝘩=n.f+e.a*cos(e.e)π˜ͺ=n.i+e.a*sin(e.e)line(𝘩,π˜ͺ,5)end line()g(n)y(n,o)if(b(n,k)<e)i-=5l=30del(o,n)print"⁷s8x5d3b3c3"
for e in all(u)do if(b(n,e)<n.s)h=min(h+5,11)del(o,n)del(u,e)
end end function g(n)n.f+=n.o n.i+=n.r end function b(n,e)z=e.f-n.f 𝘒=e.i-n.i 𝘣=atan2(z,𝘒)return z*cos(𝘣)+𝘒*sin(𝘣)end

Download

Download
jam.p8 20 kB