1K Voxel Shooter

Shooter with a voxel landscape background. Destroy the enemies. Dodge the red balls enemies shoot at your ship.

A game in 1024 Compressed Bytes of code for PICO-1K Jam 2024 #Pico1k


Features:

  1. Procedural light shaded voxel landscape running at 30fps!
  2. Wireframe 3d graphics
  3. Perspective view
  4. Depth sort
  5. Fast bullet shooting
  6. Particle explosions
  7. Autofire
  8. Highscore

Controls:

  • Left/Right/Up/Down

Code:

h=0::s::x=0y=56r=0n=0m=100p={}s=0o=0::_::?"\^1\^c9\^!5f100웃🅾️>◆?:♥7<"
r+=.005x=mid(x+btn()\2%2*2-btn()%2*2,-64,64)y=mid(y+btn()\8%2*2-btn()\4%2*2,-64,64)o-=1if(o<0)o=5add(p,{i=0,x=x-12,y=y,z=1.2})add(p,{i=0,x=x+12,y=y,z=1.2})
if(n<1)a=rnd(100)-50b=rnd(100)-a-50c=rnd(2)\1+1for i=1,8do n+=1add(p,{i=1,t=-i*.1,a=a,b=b,c=c})end
fillp(0xa5a5)for i=-64,64,3do
l=128for z=.4-y%.04,1.7,.04do
b=r+z
a=(x+z*i)/128+cos(b/32)*2d=sin(a)c=(sin(b)*cos(a)-cos(b)*d/3)*3+5j=16-(sin(b)*d+y/64-4)*16\z
if(j<=l)rectfill(i+64,j,i+66,l,c\1+(c+.5)\1*16)l=j-1
end
j=60if(j<=l)rectfill(i+64,j,i+66,l,16*8+1)l=j-1
j=58if(j<=l)rectfill(i+64,j,i+66,l,16*9+1)l=j-1
end
fillp()for q in all(p)do
if q.i<1then
q.z+=.4circfill(q.x/q.z+64,q.y/q.z+64,8/q.z,8)circ(q.x/q.z+64,q.y/q.z+64,8/q.z,13)if(q.z>10)del(p,q)
elseif q.i==1then
q.t+=.01q.x=-80*cos(mid(q.t,1)*q.c*1.5)q.y=q.a-q.b*cos(mid(q.t,1)/4)q.z=.5-5*sin(mid(q.t,1)/2)for g in all(p)do
if(g.i<1)a=q.x-g.x b=q.y-g.y c=q.z-g.z if(a*a/100+b*b/100+c*c<1)n-=1s+=1q.i=2q.t=0del(p,g)break
end
if(q.t>1)del(p,q)n-=1
circfill(q.x/q.z+64,q.y/q.z+64,16/q.z,11)circ(q.x/q.z+64,q.y/q.z+64,16/q.z,0)
elseif q.i==2then
q.t+=2for i=-(t()%1),1,.1do
circfill((q.x+cos(i)*q.t)/q.z+64,(q.y+sin(i)*q.t)/q.z+64,4/q.z,0)
end
if(q.t>32)del(p,q)
else
q.x+=q.a
q.y+=q.b
q.z+=q.c
if(q.z<1)del(p,q)a=x-q.x b=y-q.y if(a*a+b*b<256)h=max(h,s)goto s
circfill(q.x/q.z+64,q.y/q.z+64,16/q.z,1)
end
end
m-=1if(m<0)q=rnd(p)if(q.i==1and q.z>4)m=64add(p,{i=3,x=q.x,y=q.y,z=q.z,a=(x-q.x)/32,b=(y-q.y)/32,c=-q.z/32})
for i=2,#p do
q=p[i]j=i-1while j>0do
g=p[j]if(q.z<=g.z)break
p[j+1]=g
p[j]=q
j-=1
end
end
for j=-1,1do
q={}a=8-j*j*4for i=.125,1.125,.25do
add(q,{(x+j*12+a*cos(i))/1.1+64,(y+a*sin(i))/1.1+64})
add(q,{(x+j*12+a*cos(i)/2)/1.3+64,(y+a*sin(i)/2)/1.3+64})
end
for i=0,6,2do
line(q[i+1][1],q[i+1][2],q[i+2][1],q[i+2][2],0)
line(q[i+1][1],q[i+1][2],q[i+3][1],q[i+3][2])
line(q[i+2][1],q[i+2][2],q[i+4][1],q[i+4][2])
end
end
?s,8
?h
goto _
StatusReleased
PlatformsHTML5
Rating
Rated 4.5 out of 5 stars
(2 total ratings)
AuthorSkyBerron
GenreShooter
Made withPICO-8
Tagspico1k, PICO-8

Comments

Log in with itch.io to leave a comment.

Really cool, yet another seriously impressive PICO-8 game
(haven't played many yet but PICO-1K jam is destroying my perception of what PICO-8 can do)

Got a high score of 128
How much am I missing to break the game?

Phenomenal!

This is crazy impressive, thanks for your work and sharing it!

Thanks! At first, I thought it was impossible to mix voxel landscape and a shooter in just 1024 compressed bytes, but it worked!

Really fun!

It has a very well achieved depth effect.

Congratulations!

Thanks a lot! I'm looking forward to your next ZX Spectrum game!