Skip to content

Commit

Permalink
Sounds + music
Browse files Browse the repository at this point in the history
  • Loading branch information
EmperorPenguin18 committed Oct 1, 2023
1 parent c9df871 commit eb4dd4c
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 2 deletions.
Binary file added assets/death.sfx
Binary file not shown.
Binary file added assets/kill.sfx
Binary file not shown.
Binary file added assets/music.mmpz
Binary file not shown.
Binary file added assets/shoot.sfx
Binary file not shown.
Binary file added assets/spawn.sfx
Binary file not shown.
Binary file added game/death.wav
Binary file not shown.
4 changes: 4 additions & 0 deletions game/enemy.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
}
],
"collision_1": [
{
"type": "sound",
"file": "kill.wav"
},
{
"type": "destroy"
}
Expand Down
Binary file added game/kill.wav
Binary file not shown.
Binary file added game/music.ogg
Binary file not shown.
8 changes: 8 additions & 0 deletions game/player.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@
"collision_type": 0,
"events": {
"collision_3": [
{
"type": "sound",
"file": "death.wav"
},
{
"type": "destroy"
}
],
"collision_4": [
{
"type": "sound",
"file": "death.wav"
},
{
"type": "destroy"
}
Expand Down
4 changes: 4 additions & 0 deletions game/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ end
function shoot_up(e, instance)
if (can_shoot == true)
then
action(e, instance, '"type": "sound", "file": "shoot.wav"')
local bullet = spawn(e, instance, "bullet_up.json", 0, -25, true)
can_shoot = false
action(e, instance, '"type": "timer", "num": 2, "time": 0.25')
Expand All @@ -92,6 +93,7 @@ end
function shoot_right(e, instance)
if (can_shoot == true)
then
action(e, instance, '"type": "sound", "file": "shoot.wav"')
local bullet = spawn(e, instance, "bullet_right.json", 25, 0, true)
can_shoot = false
action(e, instance, '"type": "timer", "num": 2, "time": 0.25')
Expand All @@ -103,6 +105,7 @@ end
function shoot_down(e, instance)
if (can_shoot == true)
then
action(e, instance, '"type": "sound", "file": "shoot.wav"')
local bullet = spawn(e, instance, "bullet_down.json", 0, 25, true)
can_shoot = false
action(e, instance, '"type": "timer", "num": 2, "time": 0.25')
Expand All @@ -114,6 +117,7 @@ end
function shoot_left(e, instance)
if (can_shoot == true)
then
action(e, instance, '"type": "sound", "file": "shoot.wav"')
local bullet = spawn(e, instance, "bullet_left.json", -25, 0, true)
can_shoot = false
action(e, instance, '"type": "timer", "num": 2, "time": 0.25')
Expand Down
4 changes: 4 additions & 0 deletions game/room.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
}
],
"timer_0": [
{
"type": "sound",
"file": "spawn.wav"
},
{
"type": "spawn",
"object": "enemy.json",
Expand Down
1 change: 1 addition & 0 deletions game/room.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
function create_room(e, instance)
math.randomseed(os.time())
action(e, instance, '"type": "window", "w": 768, "h": 768')
action(e, instance, '"type": "music", "file": "music.ogg"')
local player = spawn(e, instance, "player.json", 384, 384, false)
local corner_tl = spawn(e, instance, "corner.json", 32, 32, false)
action(e, corner_tl, '"type": "rotation", "angle": 0')
Expand Down
Binary file added game/shoot.wav
Binary file not shown.
Binary file added game/spawn.wav
Binary file not shown.
1 change: 0 additions & 1 deletion to-do.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ Sunday:
- Player bullet cooldown
- Sprites
- Sound effects + Music
- Score / timer
- Balancing / polishing
- Submission!
3 changes: 2 additions & 1 deletion tools-used.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Font: https://fontlibrary.org/en/font/cave-story
Art: Aseprite
Engine: Custom

Sound effects: Sfxr
Music: LMMS

0 comments on commit eb4dd4c

Please sign in to comment.