Skip to content

Commit

Permalink
sound effects
Browse files Browse the repository at this point in the history
  • Loading branch information
noelbk committed Feb 27, 2017
1 parent 155d38e commit ecedaf1
Show file tree
Hide file tree
Showing 18 changed files with 420 additions and 88 deletions.
4 changes: 0 additions & 4 deletions brunch-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,5 @@ exports.config = {
"js/app.js": ["web/static/js/app"],
"js/skin.js": ["web/static/js/skin"],
}
},

npm: {
enabled: true,
}
};
2 changes: 1 addition & 1 deletion lib/battle_snake/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule BattleSnake.Endpoint do
# when deploying your static files in production.
plug Plug.Static,
at: "/", from: :battle_snake, gzip: false,
only: ~w(css fonts images js favicon.ico robots.txt)
only: ~w(css fonts audio images js favicon.ico robots.txt)

# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"watch": "brunch watch --stdin"
},
"dependencies": {
"jquery": "^3.1.0",
"howler": "^2.0.2",
"jquery": "^3.1.1",
"mousetrap": "^1.6.0",
"phoenix": "file:deps/phoenix",
"phoenix_html": "file:deps/phoenix_html",
Expand Down
1 change: 1 addition & 0 deletions web/controllers/skin_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ defmodule BattleSnake.SkinController do
{:ok, game_form} = GameForm.get(id)
conn
|> put_layout(false)
|> put_resp_header("access-control-allow-origin", "*")
|> render("show.html", game: game_form)
end
end
Binary file added web/static/assets/audio/Barrel-Exploding.mp3
Binary file not shown.
Binary file added web/static/assets/audio/Blast.mp3
Binary file not shown.
Binary file added web/static/assets/audio/Bomb-3.mp3
Binary file not shown.
Binary file added web/static/assets/audio/Cartoon-Bite.mp3
Binary file not shown.
Binary file added web/static/assets/audio/Cartoon-Munch.mp3
Binary file not shown.
Binary file added web/static/assets/audio/Explosion.mp3
Binary file not shown.
Binary file added web/static/assets/audio/Grenade-Explosion.mp3
Binary file not shown.
Binary file added web/static/assets/audio/Grenade.mp3
Binary file not shown.
Binary file added web/static/assets/audio/Wilhelm_Scream.ogg
Binary file not shown.
55 changes: 55 additions & 0 deletions web/static/assets/audio/playlists.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"effects": {
"eat": [
{ "url": "./Cartoon-Munch.mp3", "volume": 0.2 }
,{ "url": "./Cartoon-Bite.mp3", "volume": 0.2 }
]
,"explode": [
{ "url": "./Barrel-Exploding.mp3" }
,{ "url": "./Grenade.mp3" }
,{ "url": "./Blast.mp3" }
,{ "url": "./Bomb-3.mp3" }
,{ "url": "./Explosion.mp3" }
,{ "url": "./Grenade-Explosion.mp3" }
,{ "url": "./Wilhelm_Scream.ogg" }
]
}
,"music": {
"prologue": [
{"url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-ZkdYblAwMVpMMEU"
,"name": "14 - Vena's Dance.mp3" }
,{"url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-Nm8zR3d6TWZCUkk"
,"name": "9-42 The Apple_ M4 tk 1.mp3" }
,{"url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-bGUzSU8wZ19sMzQ"
,"name": "9-39 The Apple_ M1 tk 1.mp3" }
]
,"fight": [
{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-UHpzSzNkOXBUMEU"
,"name": "Speedy Reader" }
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-VWdZT1BwZTU1WVk"
,"name": "Temporal Wake"}
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-ZFdHZEpDYzFDd2s"
,"name": "Surprise Attack" }
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-UUszZWRuZzZ3NGs"
,"name": "Klingon Battle" }
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-alhGWW1RMWJmSk0"
,"name": "7-12 Amok Time_ Ritual _ To the Deat" }
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-YVlfaTc2RkRPTGc"
,"name": "Amok Time The Ancient Combat" }
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-Nkd5RnB5OG5KY2s"
,"name": "James Horner - 1986 - Aliens - Deluxe Edition - Ripley's Rescue" }
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-dHJ3dk1HaFB1cVE"
,"name": "Utah Saints - Utah Saints Take On The Theme From Mortal Kombat" }
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-YlI4YWM3WHMzcXM"
,"name": "Traci Lords - Control (Juno Reactor Instrumental)"}
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-TkZtTmNQTmJoNXc"
,"name": "The Immortals - Techno-Syndrome 7 Mix"}
]
,"epilogue": [
{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-c0FGQk1IR1JOS1k"
,"name": "03 - Survivors.mp3"}
,{ "url": "http://drive.google.com/uc?export=download&id=0B0Y-FESP0bc-MEd4VkxSS3ZMenc"
,"name": "04 - Prime Specimen.mp3"}
]
}
}
6 changes: 0 additions & 6 deletions web/static/css/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,3 @@ main {
font-size: ms(-1);
}
}

.view-btn {
position: absolute;
bottom: 10px;
left: 10px;
}
1 change: 0 additions & 1 deletion web/static/js/skin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import "phoenix_html"
// paths "./socket" or full ones "web/static/js/socket".
import socket from "./socket"
import $ from "jquery";
import vue from "vue";
import Mousetrap from "mousetrap";
import GameRenderer from "./snake";

Expand Down
Loading

0 comments on commit ecedaf1

Please sign in to comment.