Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Silent songView game page

Submitted by Mikelangelon — 5 hours, 1 minute before the deadline
Add to collection

Play game

Silent song's itch.io page

Compressed Bytes used
1008

Source Code (OPTIONAL)
function _init()
scene = "menu"
pl={x=63,y=10,s=1,h=100}
enemies = {}
e_c=0
p_c=0
e_n=30
score=0
p={}
b=2
bs=0
end

function _update()
if scene == "menu" or scene=="death" then
if btn(❎) then
_init()
scene = "game"
end
notes_update(10)
elseif scene == "game" then
game_update()
end
end

function _draw()
cls()
if scene == "game" or scene=="death" then
game_draw()
end
if scene == "menu" or scene=="death" then
notes_draw()
print("silent song", 42,40,7)
print("press ❎ to start", 30,64,7)
end
end

function game_update()
e_c+=1
if btnp(❎) and b>0 then
bs=8
b-=1
end
if btn(➡️) then
pl.x+=1+bs
pl.f=false
elseif btn(⬅️) then
pl.x-=1+bs
pl.f=true
end
if btnp(⬆️) then
pl.s=1
end
pl.y-=pl.s+bs
if pl.s > 0 then
pl.s-=0.1
else
pl.s-=0.05
end
if bs>0 then
bs-=1
pl.c=10
else
pl.c=14
end
if (pl.x<-1 or pl.x>124) scene="death"
if (pl.y<-2 or pl.y>124) scene="death"
if (col()) scene="death"
if e_c > e_n then
e_spam()
e_c=0
e_n-=0.1
end
for e in all(enemies) do
e.x+=e.sx
e.y+=e.sy
if (e.x>118 or e.x<-10) del(enemies,s)
if (e.y>120 or e.y<-10) del(enemies,s)

end
notes_update(100)
end

function notes_update(n)
p_c+=1
if p_c > n then
np={sp="♪",x=rnd(120),y=0,s=0.1,c=flr(rnd(9)+1)}
if (rnd()>0.95) np.sp="❎" np.c=15
add(p,np)
p_c=0
end
for e in all(p) do
e.y+=e.s
if (e.y>120) del(p,s)
end
p_col()
end

function game_draw()
rect( 1, 5, 126, 126,1)
print("score:",2,0,10)
print(score,30, 0,10)
print("♪",pl.x, pl.y,pl.c)
for e in all(enemies) do
print("✽", e.x, e.y, e.c)
end
notes_draw()
for i=1,b do
print("❎", 90+ i*10,0, 2)
end
end

function notes_draw()
for s in all(p) do
print(s.sp, s.x, s.y, s.c)
end
end
function col()
for e in all(enemies) do
if (hit(pl.x, pl.y, e.x, e.y)) return true
end
end

function p_col()
for s in all(p) do
if hit(pl.x, pl.y, s.x, s.y) then
del(p,s)
if (s.sp=="❎" and b<3) b+=1
if (s.sp=="♪") score+=s.c
end
end
end

function hit(x1,y1,x2,y2)
local xd=abs((x1+2)-(x2+2))
local yd=abs((y1+2)-(y2+2))
if (xd<4 and yd<4) return true
return false
end

function e_spam()
amount = flr(score/30)
dir=rnd() < 0.5
x=-10
y=rnd(120)
sx=(rnd(2)-1)*2
sy=0
c=2
if (sx<0) x=120 c=12
if dir then
for i=0,amount do
add(enemies,{x=x,y=y+(i*10),sx=sx,sy=sy,c=c})
end
else
c+=1
add(enemies,{x=y,y=x,sx=sy,sy=sx,c=c})
end
end

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted

Kind of a Flappy Bird bullet hell. Simple but very fun! My best is 147

Different colors give different points, right? Took me a while to realize

HostSubmitted

This is a cool idea (+neat use of the glyphs as for the various pieces).
Managed 78 before I got too cocky! 😅
Nice one (+congrats on ur 1st PICO-8 game! 🤓👍)