diff --git a/desktop/asset-work/cat-tree/ladder-break.ogg b/desktop/asset-work/cat-tree/ladder-break.ogg new file mode 100644 index 00000000..10fce477 Binary files /dev/null and b/desktop/asset-work/cat-tree/ladder-break.ogg differ diff --git a/desktop/asset-work/cat-tree/ladder-break.wav b/desktop/asset-work/cat-tree/ladder-break.wav new file mode 100644 index 00000000..9fd0c014 Binary files /dev/null and b/desktop/asset-work/cat-tree/ladder-break.wav differ diff --git a/desktop/asset-work/ego/drop.ogg b/desktop/asset-work/ego/drop.ogg new file mode 100644 index 00000000..8a245d60 Binary files /dev/null and b/desktop/asset-work/ego/drop.ogg differ diff --git a/desktop/asset-work/ego/drop.wav b/desktop/asset-work/ego/drop.wav new file mode 100644 index 00000000..465017f0 Binary files /dev/null and b/desktop/asset-work/ego/drop.wav differ diff --git a/desktop/asset-work/inside-jail/exhale.ogg b/desktop/asset-work/inside-jail/exhale.ogg new file mode 100644 index 00000000..559fed29 Binary files /dev/null and b/desktop/asset-work/inside-jail/exhale.ogg differ diff --git a/desktop/asset-work/inside-jail/exhale.wav b/desktop/asset-work/inside-jail/exhale.wav index 60cc8c8a..98a03b17 100644 Binary files a/desktop/asset-work/inside-jail/exhale.wav and b/desktop/asset-work/inside-jail/exhale.wav differ diff --git a/desktop/asset-work/inside-jail/guard-crash.ogg b/desktop/asset-work/inside-jail/guard-crash.ogg new file mode 100644 index 00000000..38f7e67c Binary files /dev/null and b/desktop/asset-work/inside-jail/guard-crash.ogg differ diff --git a/desktop/asset-work/inside-jail/guard-crash.wav b/desktop/asset-work/inside-jail/guard-crash.wav new file mode 100644 index 00000000..40d00181 Binary files /dev/null and b/desktop/asset-work/inside-jail/guard-crash.wav differ diff --git a/desktop/asset-work/inside-jail/inhale.ogg b/desktop/asset-work/inside-jail/inhale.ogg new file mode 100644 index 00000000..a9004aeb Binary files /dev/null and b/desktop/asset-work/inside-jail/inhale.ogg differ diff --git a/desktop/asset-work/inside-jail/inhale.wav b/desktop/asset-work/inside-jail/inhale.wav index 277cf79f..66aed641 100644 Binary files a/desktop/asset-work/inside-jail/inhale.wav and b/desktop/asset-work/inside-jail/inhale.wav differ diff --git a/desktop/asset-work/inside-jail/open-door.ogg b/desktop/asset-work/inside-jail/open-door.ogg new file mode 100644 index 00000000..125fe724 Binary files /dev/null and b/desktop/asset-work/inside-jail/open-door.ogg differ diff --git a/desktop/asset-work/inside-jail/open-door.wav b/desktop/asset-work/inside-jail/open-door.wav new file mode 100644 index 00000000..850c3c47 Binary files /dev/null and b/desktop/asset-work/inside-jail/open-door.wav differ diff --git a/desktop/asset-work/inside-jail/squeak.ogg b/desktop/asset-work/inside-jail/squeak.ogg new file mode 100644 index 00000000..37f8d026 Binary files /dev/null and b/desktop/asset-work/inside-jail/squeak.ogg differ diff --git a/desktop/asset-work/inside-jail/squeak.wav b/desktop/asset-work/inside-jail/squeak.wav new file mode 100644 index 00000000..f66e4990 Binary files /dev/null and b/desktop/asset-work/inside-jail/squeak.wav differ diff --git a/desktop/gametodos.txt b/desktop/gametodos.txt index fb0d257e..823c76cb 100644 --- a/desktop/gametodos.txt +++ b/desktop/gametodos.txt @@ -1,11 +1,11 @@ ART + Update all collisions -+ Have georgia mcgorgeous talk to you PROGRAMMING + try to have dialogue for every wrong interaction + preload all sounds + behind house left direction not great ++ IOS + all mp3s @@ -24,25 +24,18 @@ AUDIO + pick up + strength potion + metal clanking - + jail door sliding open - + jail creak - + jail crash - + pit go down + ladder break + eavesdrop + milking + antique sigh + bloodclot grunt + bloodclot explode - + fountain + crowbar - + door + ambient forest + get sick + sigh + jump + chop wood + step backwards creep - + snore + shoot slinger's + new music for night diff --git a/desktop/resources/cat-tree/ladder-break.ogg b/desktop/resources/cat-tree/ladder-break.ogg new file mode 100644 index 00000000..10fce477 Binary files /dev/null and b/desktop/resources/cat-tree/ladder-break.ogg differ diff --git a/desktop/resources/ego/drop.ogg b/desktop/resources/ego/drop.ogg new file mode 100644 index 00000000..8a245d60 Binary files /dev/null and b/desktop/resources/ego/drop.ogg differ diff --git a/desktop/resources/inside-jail/exhale.ogg b/desktop/resources/inside-jail/exhale.ogg index efa71264..559fed29 100644 Binary files a/desktop/resources/inside-jail/exhale.ogg and b/desktop/resources/inside-jail/exhale.ogg differ diff --git a/desktop/resources/inside-jail/guard-crash.ogg b/desktop/resources/inside-jail/guard-crash.ogg new file mode 100644 index 00000000..38f7e67c Binary files /dev/null and b/desktop/resources/inside-jail/guard-crash.ogg differ diff --git a/desktop/resources/inside-jail/inhale.ogg b/desktop/resources/inside-jail/inhale.ogg index f8945a9b..a9004aeb 100644 Binary files a/desktop/resources/inside-jail/inhale.ogg and b/desktop/resources/inside-jail/inhale.ogg differ diff --git a/desktop/resources/inside-jail/open-door.ogg b/desktop/resources/inside-jail/open-door.ogg new file mode 100644 index 00000000..125fe724 Binary files /dev/null and b/desktop/resources/inside-jail/open-door.ogg differ diff --git a/desktop/resources/inside-jail/squeak.ogg b/desktop/resources/inside-jail/squeak.ogg new file mode 100644 index 00000000..37f8d026 Binary files /dev/null and b/desktop/resources/inside-jail/squeak.ogg differ diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index d9cd2084..ce6a0389 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -514,8 +514,11 @@ :none))) (defn play-sound - ([entities sound-file vol] - (let [s (sound sound-file)] + ([entities sound-file vol & [wait?]] + (let [wait? (if (nil? wait?) true wait?) + s (if (string? sound-file) + (sound sound-file) + sound-file)] (run-action entities (begin [this screen entities] (utils/play-sound! screen entities s (constantly vol))) @@ -523,9 +526,11 @@ (continue [this screen entities] entities) (done? [this screen entities] - (not (seq (filter - #(= s (:sound %)) - (get-in entities [:current-sounds :value]))))) + (if wait? + (not (seq (filter + #(= s (:sound %)) + (get-in entities [:current-sounds :value])))) + true)) (terminate [this screen entities] entities) @@ -836,8 +841,11 @@ :none))) (defn georgia-say [entities msg] + (transition-music entities :love :duration 0.5) + (Thread/sleep 1000) (fade-in-georgia entities) (actions/talk entities :georgia-face msg) + (Thread/sleep 1000) (fade-out-georgia entities) (transition-music entities nil :duration 1.0)) @@ -872,3 +880,35 @@ (fade-out-georgia entities) (do-stop entities :georgia-face) (transition-music entities nil :duration 1.0)))) + + +(defn do-pan [entities x y scale-fn & [ease duration]] + (actions/run-action entities + (begin [this screen entities] + (pan-to screen entities x y scale-fn ease duration)) + + (continue [this screen entities] + entities) + + (done? [this screen entities] + (nil? (get-in entities [:tweens :cam-y]))) + + (terminate [this screen entities] + entities) + (skip-type [this screen entities] + :none))) + +(defn camera-shake [entities length] + (dotimes [n length] + (actions/do-pan entities (get-in @entities [:cam :x]) + (+ (get-in @entities [:cam :y]) + 3) + (constantly (get-in @entities [:cam :zoom])) + nil + (* 0.01 (inc n))) + (actions/do-pan entities (get-in @entities [:cam :x]) + (- (get-in @entities [:cam :y]) + 3) + (constantly (get-in @entities [:cam :zoom])) + nil + (* 0.01 (inc n))))) diff --git a/desktop/src-common/advent/screens/rooms/cat_tree.clj b/desktop/src-common/advent/screens/rooms/cat_tree.clj index ca1a0cde..7eeffcc2 100644 --- a/desktop/src-common/advent/screens/rooms/cat_tree.clj +++ b/desktop/src-common/advent/screens/rooms/cat_tree.clj @@ -216,7 +216,9 @@ destroy-ladder (utils/make-anim "cat-tree/destroy-ladder.png" [29 38] 0.1 (range 18)) ladder-entity (assoc (utils/get-texture "inside-cafeteria/ladder.png") :x 130 :y 60 :baseline 162 :origin-x 0 - :destroy-ladder destroy-ladder) + :destroy-ladder destroy-ladder + :ladder-break-sound (utils/load-sound "cat-tree/ladder-break.ogg") + :anim-sound-frames {destroy-ladder {4 [:ladder-break-sound 0.3]}}) grandma-stand (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]) grandma-squat-1 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [3 4 5 5 5 5 5]) grandma-squat-2 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [5 5 4 3]) diff --git a/desktop/src-common/advent/screens/rooms/dream.clj b/desktop/src-common/advent/screens/rooms/dream.clj index c8778d25..bd83c5f7 100644 --- a/desktop/src-common/advent/screens/rooms/dream.clj +++ b/desktop/src-common/advent/screens/rooms/dream.clj @@ -398,6 +398,10 @@ (actions/do-dialogue entities :ego "Yes! Now, before he gets back!") (actions/pause-camera entities) (actions/walk-straight-to entities :ego [173 51] :anim :jump :update-baseline? false :speed 2.0) + (actions/play-sound entities + (get-in @entities [:room :entities :ego :drop-sound]) + 0.2 + false) (actions/walk-straight-to entities :ego [200 -80] :anim :stand :update-baseline? false :speed 3.0) (actions/remove-item entities :dream-sword) (actions/remove-item entities :broom) diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index 1cbc875d..a1df8b90 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -263,6 +263,8 @@ (particle-effect! (get-in @entities [:room :entities :magic]) :allow-completion) (actions/resume-camera entities) (actions/transition-music entities nil) + (actions/camera-shake entities 12) + (Thread/sleep 500) (actions/do-dialogue entities :ego "That was weird." :ego "I have to go show my friends!") @@ -427,8 +429,8 @@ (actions/do-dialogue entities :ego "That's Georgia McGorgeous' house." :ego "One day, when I'm a knight, she'll say...") - #_(actions/georgia-say entities "Kiss me, brave Sir Tick!") - (actions/in-love entities))}} + (actions/georgia-say entities "Kiss me, brave Sir Tick!") + #_(actions/in-love entities))}} :layers {:day [(assoc (utils/get-texture "inside-castle/background.png") :x 0 :y 0 :baseline 0) (assoc (utils/get-texture "inside-castle/way-back-tree.png") :x 0 :y 0 :baseline 97) (assoc (utils/get-texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5) diff --git a/desktop/src-common/advent/screens/rooms/inside_jail.clj b/desktop/src-common/advent/screens/rooms/inside_jail.clj index 3f3cff7f..2a56e1b9 100644 --- a/desktop/src-common/advent/screens/rooms/inside_jail.clj +++ b/desktop/src-common/advent/screens/rooms/inside_jail.clj @@ -23,6 +23,7 @@ (actions/walk-to entities :ego [174 80] :face :right) (actions/play-animation entities :ego :reach) (actions/talk entities :ego "Yes, that's it!") + (actions/play-sound entities "inside-jail/open-door.ogg" 0.5 false) (actions/walk-straight-to entities :moveable-bars [65 77]) (actions/update-entities entities #(remove-lock %)) (actions/update-state entities #(assoc % :opened-bars? true))) @@ -251,10 +252,17 @@ :ball-n-chain (actions/get-script entities (if (get-in @entities [:state :bent-bars?]) (do (actions/walk-to entities :ego [102 88] :face :right) (actions/play-animation entities :ego :reach) + (actions/play-sound entities + (get-in @entities [:room :entities :ego :drop-sound]) + 0.2) (actions/update-state entities #(assoc % :dropped-ball? true)) - (actions/do-dialogue entities :ego "Geronimo!!" - :ego "*crash*!") - (Thread/sleep 200) + (actions/do-dialogue entities :ego "Geronimo!!") + (actions/play-sound entities + "inside-jail/guard-crash.ogg" + 0.6 false) + + (actions/camera-shake entities 6) + (actions/begin-animation entities :warden :stand) (Thread/sleep 300) (actions/do-dialogue entities @@ -323,11 +331,11 @@ (update-in [:room :entities :ego] #(actions/start-animation screen % :stand)))] ((actions/get-script entities (actions/stop-walking entities :ego) - (actions/do-dialogue entities - :ego "*creak*" + (actions/play-sound entities "inside-jail/squeak.ogg" 0.15) + (actions/do-dialogue entities :ego "Oops!" :warden "Hey! What are you doing?" - :warden "Get back in jail.") + :warden "Trying to escape, are ye chap?") (common/go-to-jail entities) (actions/do-dialogue entities :warden "Now don't let me catch you trying to escape again.") (actions/play-animation entities :warden :fall-asleep :stop? false) @@ -351,8 +359,8 @@ warden-talk {10 [:blink 0.15]} warden-fall-asleep {7 [:blink 0.15] 18 [:blink 0.15]} - warden-sleep {0 [:inhale 1.0] - 2 [:exhale 1.0]}} + warden-sleep {0 [:inhale 0.1] + 10 [:exhale 0.1]}} :script (actions/get-script entities (cond (actions/has-item? entities :key) (actions/talk entities :ego "Shh! It's best not to wake him now.") diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index e4b9e740..1ec82a1b 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -96,6 +96,8 @@ (actions/walk-to entities :ego [141 90] :face :right) (actions/play-animation entities :ego :reach) (actions/remove-item entities :money) + (actions/camera-shake entities 2) + (Thread/sleep 500) (actions/talk entities :ego "I guess that's what you could call 'money in the pot'.")) (actions/talk entities :ego "I don't want to put something in there unless I'm sure I need to."))) :slingshot (actions/get-script entities @@ -105,7 +107,9 @@ (dawn-fade entities) (actions/talk entities :ego "Here goes!") (actions/play-animation entities :ego :reach-start :stop? false) + (actions/camera-shake entities 12) (magic entities) + (actions/play-animation entities :ego :reach-stop :stop? true) (actions/remove-item entities :slingshot) @@ -137,6 +141,8 @@ (actions/walk-to entities :ego [141 90] :face :right) (actions/play-animation entities :ego :reach) (actions/remove-item entities :broken-clock) + (actions/camera-shake entities 2) + (Thread/sleep 500) (actions/talk entities :ego "Just in the nick of time.")) (actions/talk entities :ego "I don't want to put something in there unless I'm sure I need to."))) :recipe (actions/get-script entities @@ -149,6 +155,8 @@ (actions/walk-to entities :ego [141 90] :face :right) (actions/play-animation entities :ego :reach) (actions/remove-item entities :spell-component) + (actions/camera-shake entities 2) + (Thread/sleep 500) (actions/talk entities :ego "I poured it in. Now what?")) (actions/get-script entities (actions/talk entities :ego "I don't want to put something in there unless I'm sure I need to.")))) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index f67b6468..a54f3ccf 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -629,6 +629,7 @@ void main() :origin-x 9 :origin-y 0 :scaled true + :drop-sound (utils/load-sound "ego/drop.ogg") :milk-sound (utils/load-sound "outsidehouse/milk.ogg") :step-sound-1 (utils/load-sound "ego/step-1.ogg") :step-sound-2 (utils/load-sound "ego/step-2.ogg") @@ -927,7 +928,7 @@ void main() (utils/update-override screen (assoc-in entities [:cursor :last-pos] [input-x input-y]))) (defn add-georgia-to-all-rooms [screen rooms] - (let [georgia-talk (utils/make-anim "ego/georgia.png" [30 30] 0.2 [0 1 0 1 0 0 1 0 1 2]) + (let [georgia-talk (utils/make-anim "ego/georgia.png" [30 30] 0.15 [0 1 0 1 0 0 1 0 1 2]) georgia-stand (utils/make-anim "ego/georgia.png" [30 30] 0.3 [0 0 0 0 0 0 0 2 0 0 0 0 2]) georgia-love (utils/make-anim "ego/in-love.png" [30 30] 0.1 [0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 4 5 6 7 8 9 10 11 12 13 14 14 14 15 15 15 14 14 14 14 14 14 14 14 15 15 15 15 15 14 14 14 14 15 15 15 15 15 15 14 14 14 14 14])