From bf9e2a059b2b059540e881bbde67ef101afb2cc2 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Mon, 14 Sep 2015 10:14:24 -0700 Subject: [PATCH] small tweaks. --- desktop/gametodos.txt | 1 + desktop/resources/packed/pack.atlas | 65 ++++++++++--------- desktop/src-common/advent/screens/fade.clj | 6 +- .../advent/screens/rooms/common.clj | 5 +- .../src-common/advent/screens/rooms/space.clj | 16 ++++- 5 files changed, 58 insertions(+), 35 deletions(-) diff --git a/desktop/gametodos.txt b/desktop/gametodos.txt index 704520ee..731d8966 100644 --- a/desktop/gametodos.txt +++ b/desktop/gametodos.txt @@ -14,6 +14,7 @@ IOS + particle effects slowdown? + pngcrush breaks colors + renable pickup sound once it's been replaced ++ check out 64 bit? AUDIO + Walking diff --git a/desktop/resources/packed/pack.atlas b/desktop/resources/packed/pack.atlas index e41ced8a..9092aa40 100644 --- a/desktop/resources/packed/pack.atlas +++ b/desktop/resources/packed/pack.atlas @@ -81,20 +81,6 @@ cat-tree/dot orig: 1, 1 offset: 0, 0 index: -1 -ego/dot - rotate: false - xy: 729, 621 - size: 1, 1 - orig: 1, 1 - offset: 0, 0 - index: -1 -outsidehouse/dot - rotate: false - xy: 729, 621 - size: 1, 1 - orig: 1, 1 - offset: 0, 0 - index: -1 dream/dot rotate: false xy: 729, 621 @@ -102,21 +88,7 @@ dream/dot orig: 1, 1 offset: 0, 0 index: -1 -inside-antique/dot - rotate: false - xy: 729, 621 - size: 1, 1 - orig: 1, 1 - offset: 0, 0 - index: -1 -title/dot - rotate: false - xy: 729, 621 - size: 1, 1 - orig: 1, 1 - offset: 0, 0 - index: -1 -inside-house/dot +ego/dot rotate: false xy: 729, 621 size: 1, 1 @@ -130,6 +102,27 @@ inside-jail/dot orig: 1, 1 offset: 0, 0 index: -1 +inside-antique/dot + rotate: false + xy: 729, 621 + size: 1, 1 + orig: 1, 1 + offset: 0, 0 + index: -1 +inside-house/dot + rotate: false + xy: 729, 621 + size: 1, 1 + orig: 1, 1 + offset: 0, 0 + index: -1 +outsidehouse/dot + rotate: false + xy: 729, 621 + size: 1, 1 + orig: 1, 1 + offset: 0, 0 + index: -1 wizard/dot rotate: false xy: 729, 621 @@ -137,6 +130,13 @@ wizard/dot orig: 1, 1 offset: 0, 0 index: -1 +title/dot + rotate: false + xy: 729, 621 + size: 1, 1 + orig: 1, 1 + offset: 0, 0 + index: -1 cat-tree/monocle rotate: false xy: 202, 3 @@ -619,6 +619,13 @@ cloud orig: 15, 15 offset: 0, 0 index: -1 +space/cloud + rotate: false + xy: 1007, 186 + size: 15, 15 + orig: 15, 15 + offset: 0, 0 + index: -1 dream/cliff rotate: false xy: 494, 638 diff --git a/desktop/src-common/advent/screens/fade.clj b/desktop/src-common/advent/screens/fade.clj index fa31530e..2345107e 100644 --- a/desktop/src-common/advent/screens/fade.clj +++ b/desktop/src-common/advent/screens/fade.clj @@ -20,8 +20,10 @@ (utils/setup-viewport screen 320 240) {:fade (assoc (utils/get-texture "black.png") - :scale-x 80 - :scale-y 80 + :scale-x 100 + :scale-y 100 + :x -1 + :y -1 :opacity 0.0 :origin-x 0 :origin-y 0)}) diff --git a/desktop/src-common/advent/screens/rooms/common.clj b/desktop/src-common/advent/screens/rooms/common.clj index 171ddae0..cbfd6865 100644 --- a/desktop/src-common/advent/screens/rooms/common.clj +++ b/desktop/src-common/advent/screens/rooms/common.clj @@ -14,7 +14,7 @@ [play-clj.g2d :refer :all]) (:import [com.badlogic.gdx.graphics Color])) -(defn go-to-jail [entities] +(defn go-to-jail [entities & [time]] (actions/update-state entities #(assoc % :chest-contents (concat (remove #{:key :ladder} (:inventory %)) (:chest-contents %)))) (actions/update-state entities #(assoc % :inventory [])) @@ -22,7 +22,8 @@ (actions/transition-background entities :inside-jail [130 85] :between (fn [s e] (-> e (assoc-in [:state :time] :night) - (update-in [:room :entities :ego] #(actions/start-animation s % :crawl-stand))))) + (update-in [:room :entities :ego] #(actions/start-animation s % :crawl-stand)))) + :time time) (actions/play-animation entities :ego :standup)) (defn make-wizard [screen wizard-spec] diff --git a/desktop/src-common/advent/screens/rooms/space.clj b/desktop/src-common/advent/screens/rooms/space.clj index 2bfd8cc9..86866b43 100644 --- a/desktop/src-common/advent/screens/rooms/space.clj +++ b/desktop/src-common/advent/screens/rooms/space.clj @@ -36,7 +36,10 @@ ((actions/get-script entities (sound! (utils/load-sound "space/shock.ogg") :play (utils/current-sound-volume)) (actions/play-animation entities :bloodclot-head :shoot :stop? false) + (actions/update-entity entities :lightning #(assoc % :opacity 1.0)) (actions/begin-animation entities :bloodclot-head :keep-shoot) + (Thread/sleep 2000) + (actions/update-entity entities :lightning #(assoc % :opacity 0.0)) (actions/do-dialogue entities :bloodclot-head "Dang! Come a little closer!")) entities)) nil) @@ -184,6 +187,7 @@ bullet (utils/make-anim "space/bullet.png" [24 24] 0.0075 [0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 3 3 3 4 4 5 5 6 5 4 7]) effect (particle-effect "particles/appear") blowup-effect (particle-effect "particles/blowup") + lightning-effect (particle-effect "particles/lightning") grow-explode (particle-effect "particles/grow-explode")] (rooms/make :music :fight :interactions @@ -204,6 +208,10 @@ :blowup (assoc blowup-effect :x 225 :y 175 :baseline 240) + :lightning (assoc lightning-effect + :x 225 :y 160 + :baseline 240 + :opacity 0.0) :bloodclot-head (assoc (animation->texture screen bloodclot-head-stand-anim) :x 195 :y 138 :baseline 195 :opacity 0.0 @@ -224,7 +232,9 @@ :script (actions/get-script entities - (actions/do-dialogue entities :bloodclot-head "Come on! Try and hit me!")) + (actions/do-dialogue entities + :bloodclot-head "No time to talk." + :bloodclot-head "It's lunch time.")) :scripts {:sword (actions/get-script entities (if (actions/has-item? entities :magic-slingshot) (if (get-in @entities [:state :broke-jewel?]) @@ -246,8 +256,10 @@ (sound! (utils/load-sound "space/shock.ogg") :play (utils/current-sound-volume)) (actions/play-animation entities :bloodclot-head :shoot :stop? false) (actions/begin-animation entities :bloodclot-head :keep-shoot) + (actions/update-entity entities :lightning #(assoc % :opacity 1.0)) (actions/play-animation entities :ego :shock :stop? false) (actions/begin-animation entities :bloodclot-head :stand) + (actions/update-entity entities :lightning #(assoc % :opacity 0.0)) (actions/play-animation entities :ego :burnt :stop? false) (actions/play-animation entities :ego :passed-out :continue? true) (actions/do-dialogue entities :bloodclot-head "Oh shucks. I overcooked him." @@ -256,7 +268,7 @@ :bloodclot-head "And THEN the feast will begin." :bloodclot-head "Starting with his precious Georgia McGorgeous.") (bloodclot-disappear entities) - (common/go-to-jail entities) + (common/go-to-jail entities 5.0) (actions/do-dialogue entities :ego "Hey!" :ego "What's going on? I was just about to teach Bloodclot a lesson!")))) :magic-slingshot (actions/get-script entities (actions/do-dialogue entities