Skip to main content

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

1K Voxel Shooter #Pico1kView game page

Shooter with a voxel landscape background. A game in 1024 Compressed Bytes of code for PICO-1K Jam 2024 #Pico1k
Submitted by SkyBerron (@SkyBerron) — 4 days, 22 hours before the deadline
Add to collection

Play game

1K Voxel Shooter #Pico1k's itch.io page

Compressed Bytes used
1024

Source Code (OPTIONAL)
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 _

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted

Took me a second to realize I wasn't generating the green balls, and that they were enemies.
Very cool graphics, neat trick having a simple working target.

Submitted

Both a voxel landscape and a game within this tight limit. Excellent!

DeveloperSubmitted

Thanks! It was inspired by your voxel graphics entry.

Cool, great job !

Submitted

Brilliant 

Submitted

This is so impressive,great job!

DeveloperSubmitted

Thanks!

HostSubmitted

Wow, you've crammed SO much into this 1K entry - the voxel terrain is great alone.
The fact you got all the other elements and AND made it a compelling play is impressive.
Congrats on the awesome entry! 👍
(Alas, my best was only 37)

DeveloperSubmitted

Thanks! I wasn't sure if I could make a game after allocating a lot of compressed bytes to the voxel landscape. Moreover, the game had to be 3d, adding some complexity to the mix. But somehow, I could make a game meeting the size constraints.

Submitted

You're on a hot streak! Great job getting so many subsystems working, I'll definitely have to pick this one apart and learn from it.

DeveloperSubmitted

Thanks! Yep, too many subsystems working, each one taking their toll of compressed bytes. Voxel landscape had to be tweaked to leave some CPU for the game. With this kind of perspective view it's difficult to aim to enemies and sometimes it's a bit confusing. Although I think I solved depth sort cleanly with all entities in the same table, 3d games usually require a lot of code, so many planned features had to be dropped to get down to 1024 compressed bytes. I think I left collision detection a bit buggy, but it's not a big issue. No difficulty ramp is maybe the worst issue.

Submitted (1 edit) (+1)

I can sympathize with having to hack things down. Personally I think one of the best things about cramming code like this is that it forces you to find efficient ways of doing things, and you can use that in other projects that aren't so constrained. I'm planning to make a non-crunched version of my entry sometime after the jam, to further polish it up and flesh out some of the ideas.

DeveloperSubmitted

I agree. I always wanted to make games but found the process too steep because I couldn't manage big projects efficiently and ended up losing motivation. With this kind of limited scope projects, I'm able to build many games in a short time and the constraints push me to focus on the main concepts and features. I tend to overcomplicate things and found this is a good exercise to improve my problem solving skills and complexity management. I also love maths and procedural generation. Both of them are very useful when you try to make big things with little code.

Submitted (2 edits)

I can very much relate, it's both an interesting puzzle and an extreme means of scope limitation. I get game ideas, but see the potential for something beyond my current skills and don't know where to start. Moving forward, my strategy for any more substantial projects will be to make a small, simple version first, then a slightly scaled-back version after I've gained the initial know-how.