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

1KommandView game page

A missile command clone in 1K.
Submitted by Wesley — 21 days, 3 hours before the deadline
Add to collection

Play game

1Kommand's itch.io page

Compressed Bytes used
1024

Source Code (OPTIONAL)
mis,bom,bas={},{},{}
tax,tay,kb,sco,shk=64,64,1,0,0
for n=0,3 do
add(bas,{x=16+n*32,y=120+rnd(5)})
end
function _update()
shk=max(0,shk-.25)
for m in all(mis)do
m.x,m.y,_b=clp(m.x+cos(m.a)*m.s,m.y+sin(m.a)*m.s)
m.d-=m.s
if(m.d<0)_b=1
for b in all(bom)do
if not m.b and dist(b.x-m.x,b.y-m.y)<b.r then
_b=1
sco+=#bas
end
end
if _b then
if(m.b)m.b.w=nil
del(mis,m)
if(m.y>16)boom(m.x,m.y,m.c)
end
end
for b in all(bom)do
b.r+=.4
if(b.r>b.s)del(bom,b)
for a in all(bas)do
if b.y>a.y and dist(b.x-a.x,b.y-a.y)<b.r then
boom(a.x,a.y,8)
del(bas,a)
shk=5
end
end
end
if(#bas==0)return
if btnp(4,1) then
kb=not kb
poke(0x5f2d,kb and 0x0 or 0x3)
end
if btnp(5)then
for n=1,6do
b=rnd(bas)
if not b.w then
print"\as9x6i0g2eb"
fire(b.x,128,b)
b.w=1
break
end
end
end
wave=ceil(20*time()/300)
if(#mis<wave)fire()
end
function _draw()
if shk>0then
cls(1)
print"\as8i6x3c4s3c0"
if(#bas==0)boom(rnd(128),128,8+rnd(3))
end
camera(rnd(shk),rnd(shk))
for i=1,64do
circfill(rnd(128),rnd(128),4,1)
end
line(0,127,128,127,4)
for b in all(bas)do
rectfill(b.x-3,b.y,b.x+3,128,6)
end
for m in all(mis)do
pset(m.x,m.y,m.c)
end
for m in all(bom)do
circfill(m.x,m.y,m.r,m.c)
end
rectfill(0,0,128,6,4)
print("score:"..sco.." wave:"..wave,1,1,6)
if(#bas==0)then
print("earth lost",44,64,8)
return
end
circ(tax,tay,1,1)
if kb then
if(btn(0))tax-=4
if(btn(1))tax+=4
if(btn(2))tay-=4
if(btn(3))tay+=4
else
tax,tay=stat(32),stat(33)
end
circ(tax,tay,1,7)
end
function fire(x,y,b)
d=x and dist(tax-x,tay-y) or 0x100
a=x and atan2(tax-x,tay-y)
x,y=x or rnd(126),y or 1
a=a or atan2(rnd(120)-x,128-y)
add(mis,{x=x,y=y,a=a,s=b and 2or.5,d=d,c=b and 10 or 8+rnd(8),b=b})
end
function boom(x,y,c)
print"\as8i6x3c4s3c0"
add(bom,{x=x,y=y,r=1,s=8+rnd(15),c=c})
end
function clp(a,b)
a=min(128,max(0,a))
b=min(128,max(0,b))
return a,b,a==0 or a==128 or b==0 or b==128
end
function dist(a,b)
return sqrt((abs(a)^2)+(abs(b)^2))
end

Link to Commented Source Code (OPTIONAL)
https://gist.github.com/wesleywerner/0b2d5f1b28c7388866d41a990577ea84

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted (2 edits)

Great game! Although unlimited ammo with no overheating issues makes it easier to survive as long as you don't lose fire power, watching the resulting fireworks is very satisfying. The circfill screen clearing effect is great and the sfx sound is excellent.

DeveloperSubmitted

Thanks!

I am glad you found the fireworks satisfying. They are the best part :-)

I tried to balance the unlimited ammo by making each base only fire one at a time, until its projectile explodes, then it can fire again. Then I discovered it is easier to play with one base than four, and tried to balance that aspect by awarding higher score for every undamaged base you have, so its in your interest to protect all of them. In the end there is only so much one can do given the 1K constraint 🤯

Thanks for playing!

HostSubmitted

Great remake - gives me the same panic playing as the original
(I've never been good at this Missile Command, that's why! 😅)
Great use of the "splatter" clear effect too (never sure what to call it) - really adds to the atmosphere.
Nice one 👍

DeveloperSubmitted(+1)

Thanks!

I tried to learn and implement  proper fading effects, but it went over my head, and beyond the byte limit, so I settled for a simple circle filling method. I am happy how it turned out.