progress on ending.

This commit is contained in:
Bryce Covert
2015-11-13 18:35:01 -08:00
parent 56760a2efd
commit 3260b1cca5
34 changed files with 699 additions and 512 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 KiB

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 158 KiB

View File

@@ -19,106 +19,18 @@
(defn make-night [entities]
entities)
(defn walk-to-frankie [entities]
(actions/walk-to entities :ego [268 61] :face :left))
(defn drop-walkie-talkie [entities]
(actions/talk entities :ego "I'll drop one of these off in here.")
(actions/walk-to entities :ego [155 64])
(actions/walk-straight-to entities :ego [106 18] :face :left)
(actions/play-animation entities :ego :squat)
(actions/remove-item entities :walkie-talkies)
(actions/give entities :walkie-talkie)
(actions/walk-straight-to entities :ego [155 64]))
(defn present-frankie-choices [entities]
(actions/present-choices entities {:choices ["Please, Frankie. Give me my stuff back!"
{:run #(do (actions/respond entities %
:frankie "Not a chance, Dipstick."
:frankie "Burglers like us gotta eat too, you know."
:ego "But it's a matter of life and death!"
:ego "Plus, Georgia's counting on me!")
(actions/georgia-say entities "I'm counting on you, Tick!")
(actions/do-dialogue entities
:frankie "Georgia's going steady with me now, Dipstick."
:frankie "No day-dreaming about my girlfriend!")
(actions/play-animation entities :frankie :laugh)
(actions/do-dialogue entities :frankie "You'd be better off if you just packed your bags and left town."
:frankie "Ain't that right, boys?")
(actions/play-animation entities :frankie :glance))
:choices actions/previous-choices}
"You guys are nothing but a bunch of crooks!"
{:run #(do (actions/respond entities %
:frankie "Oh please."
:frankie "Like you're so different."
:frankie "Am I right, boys?")
(actions/play-animation entities :frankie :glance)
(actions/do-dialogue entities
:frankie "We steal gold, diamonds, and relic slingshots."
:frankie "And you steal teddy bears.")
(actions/play-animation entities :frankie :laugh))
:choices actions/previous-choices}
"Where is your secret stash?"
{:run #(do (actions/respond entities % :frankie "Like I'd ever tell you, Dipstick.")
(actions/play-animation entities :frankie :laugh)
(actions/do-dialogue entities :frankie "That's only for people in the 'Super secret cool club'!"))
:choices actions/previous-choices}
(when-not (get-in @entities [:state :bubba-gone?])
"I found your secret stash!")
{:run #(do (actions/respond entities %
:frankie "What?!"
:frankie "Impossible!")
(actions/play-animation entities :frankie :laugh)
(actions/update-state entities (fn [s] (assoc s :bubba-gone? true)))
(actions/do-dialogue entities :frankie "Bubba, go check to make sure our stuff is safe."
:goon-2 "You got it, boss.")
(actions/walk-straight-to entities :goon-2 [0 100]))}
"Nevermind."
{:run #(actions/respond entities % :frankie "Come back when you've got some good valuables.")}]}))
(defn make-frankie [screen]
(let [stand (utils/make-anim "castle-gate/frankie.png" [24 35] 0.19 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
talk (utils/make-anim "castle-gate/frankie.png" [24 35] 0.2 [2 0 2 0 2 0 2 0 0 1 0])
laugh (utils/make-anim "castle-gate/frankie.png" [24 35] 0.1 [1 3 4 3 4 3 4 3 4 3 4 3 4 1 0])
glance (utils/make-anim "castle-gate/frankie.png" [24 35] 0.25 [0 6 0 6 5 5 5 6 7 7 7 6 ])
reach (utils/make-anim "castle-gate/frankie.png" [24 35] 0.2 [0 8 9 9 9 9 8])
flex (utils/make-anim "castle-gate/frankie.png" [24 35] 0.2 [0 10 11 12 12 12 12 11 10])]
(assoc (animation->texture screen stand)
:x 235 :y 90 :baseline 150
:origin-x 12
:origin-y 0
:anim stand
:anim-start 0
:night-profile :sprite
:scale-x 1.4
:scale-y 1.4
:talk-color common/frankie-color
:talk talk
:flex flex
:stand stand
:laugh laugh
:glance glance
:reach reach
:script (actions/get-script entities
(walk-to-frankie entities)
(actions/talk entities :ego "Listen, Frankie...")
(present-frankie-choices entities))
:scripts {:walkie-talkies (actions/get-script entities
(actions/do-dialogue entities :frankie "Tin cans? What do I need walkie talkies for?"))
:default (actions/get-script entities
(actions/do-dialogue entities :frankie "What? Wanting to give up more of your goodies?"))})))
(defn make-coin-flip [screen]
(let [coin-flip (utils/make-anim "castle-gate/coinflip.png" [10 10] 0.05 (range 5))]
@@ -277,7 +189,7 @@
(assoc (utils/get-texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]
:night [(assoc (utils/get-texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/get-texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]}
:entities {:frankie (make-frankie screen)
:entities {:frankie (common/make-frankie screen)
:goon-1 (make-goon-1 screen)
:goon-2 (make-goon-2 screen)
:outside-particles (common/make-outside-particles)

View File

@@ -105,6 +105,7 @@
:ego "Don't forget about my secret stash of helpful stuff.\""))
(def frankie-color (Color/valueOf "9907CFFF"))
(defn listen-to-frankie [entities]
(let [respond (fn [msg]
(actions/talk entities :ego msg :animate? false :stop? false :color frankie-color)
@@ -234,6 +235,90 @@
(respond "Leave us alone!"))}]}))
)
(defn walk-to-frankie [entities]
(actions/walk-to entities :ego [268 61] :face :left))
(defn present-frankie-choices [entities]
(actions/present-choices entities {:choices ["Please, Frankie. Give me my stuff back!"
{:run #(do (actions/respond entities %
:frankie "Not a chance, Dipstick."
:frankie "Burglers like us gotta eat too, you know."
:ego "But it's a matter of life and death!"
:ego "Plus, Georgia's counting on me!")
(actions/georgia-say entities "I'm counting on you, Tick!")
(actions/do-dialogue entities
:frankie "Georgia's going steady with me now, Dipstick."
:frankie "No day-dreaming about my girlfriend!")
(actions/play-animation entities :frankie :laugh)
(actions/do-dialogue entities :frankie "You'd be better off if you just packed your bags and left town."
:frankie "Ain't that right, boys?")
(actions/play-animation entities :frankie :glance))
:choices actions/previous-choices}
"You guys are nothing but a bunch of crooks!"
{:run #(do (actions/respond entities %
:frankie "Oh please."
:frankie "Like you're so different."
:frankie "Am I right, boys?")
(actions/play-animation entities :frankie :glance)
(actions/do-dialogue entities
:frankie "We steal gold, diamonds, and relic slingshots."
:frankie "And you steal teddy bears.")
(actions/play-animation entities :frankie :laugh))
:choices actions/previous-choices}
"Where is your secret stash?"
{:run #(do (actions/respond entities % :frankie "Like I'd ever tell you, Dipstick.")
(actions/play-animation entities :frankie :laugh)
(actions/do-dialogue entities :frankie "That's only for people in the 'Super secret cool club'!"))
:choices actions/previous-choices}
(when-not (get-in @entities [:state :bubba-gone?])
"I found your secret stash!")
{:run #(do (actions/respond entities %
:frankie "What?!"
:frankie "Impossible!")
(actions/play-animation entities :frankie :laugh)
(actions/update-state entities (fn [s] (assoc s :bubba-gone? true)))
(actions/do-dialogue entities :frankie "Bubba, go check to make sure our stuff is safe."
:goon-2 "You got it, boss.")
(actions/walk-straight-to entities :goon-2 [0 100]))}
"Nevermind."
{:run #(actions/respond entities % :frankie "Come back when you've got some good valuables.")}]}))
(defn make-frankie [screen]
(let [stand (utils/make-anim "castle-gate/frankie.png" [24 35] 0.19 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
talk (utils/make-anim "castle-gate/frankie.png" [24 35] 0.2 [2 0 2 0 2 0 2 0 0 1 0])
laugh (utils/make-anim "castle-gate/frankie.png" [24 35] 0.1 [1 3 4 3 4 3 4 3 4 3 4 3 4 1 0])
glance (utils/make-anim "castle-gate/frankie.png" [24 35] 0.25 [0 6 0 6 5 5 5 6 7 7 7 6 ])
reach (utils/make-anim "castle-gate/frankie.png" [24 35] 0.2 [0 8 9 9 9 9 8])
flex (utils/make-anim "castle-gate/frankie.png" [24 35] 0.2 [0 10 11 12 12 12 12 11 10])]
(assoc (animation->texture screen stand)
:x 235 :y 90 :baseline 150
:origin-x 12
:origin-y 0
:anim stand
:anim-start 0
:night-profile :sprite
:scale-x 1.4
:scale-y 1.4
:talk-color frankie-color
:talk talk
:flex flex
:stand stand
:laugh laugh
:glance glance
:reach reach
:script (actions/get-script entities
(walk-to-frankie entities)
(actions/talk entities :ego "Listen, Frankie...")
(present-frankie-choices entities))
:scripts {:walkie-talkies (actions/get-script entities
(actions/do-dialogue entities :frankie "Tin cans? What do I need walkie talkies for?"))
:default (actions/get-script entities
(actions/do-dialogue entities :frankie "What? Wanting to give up more of your goodies?"))})))
(defn explode [entities]
@@ -317,7 +402,24 @@
entities)
(skip-type [this screen entities]
:none)))
(defn georgia-appear [entities]
(actions/run-action entities
(begin [this screen entities]
(-> entities
(assoc-in [:room :entities :georgia] (get-in entities [:room :georgia]))
(assoc-in [:tweens :appear-georgia]
(tween/tween :appear-georgia screen [:room :entities :georgia :opacity] 0.0 1.0 0.5 :ease tween/ease-in-out-quintic))))
(continue [this screen entities]
entities)
(done? [this screen entities]
(= 1.0 (get-in entities [:room :entities :georgia :opacity])))
(terminate [this screen entities]
entities)
(skip-type [this screen entities]
:none)))
(defn fade-out [entities]
(actions/run-action entities
(begin [this screen entities]
@@ -414,35 +516,37 @@
(Thread/sleep 400)
(actions/do-stop entities :ego :face :left)
(Thread/sleep 400)
(actions/do-dialogue entities :ego "Where's Georgia McGorgeous?")
(actions/do-dialogue entities :ego "Where's Gandarf?")
(actions/do-dialogue entities :ego "And Georgia McGorgeous?")
(actions/walk-straight-to entities :gandarf-cloud [215 100] :update-baseline? false)
(actions/do-dialogue entities :gandarf "Quickly, boy!")
(actions/do-stop entities :ego :face :right)
(actions/do-dialogue entities :ego "Gandarf?"
:gandarf "Yes, it is I!"
:ego "How did you escape?"
:gandarf "No time for that!"
:gandarf "Georgia McGorgeous has been captured!"
:ego "Captured?! By who?"
:gandarf "Bloodclot's second-in-command, Swinebreath."
:gandarf "I'm afraid that I can't save her."
:gandarf "This is a job for a knight."
:gandarf "If you are willing, Tick..."
:duke "That's 'Sir Tick'..."
:gandarf "Quite right, quite right."
:gandarf "If you are willing, Sir Tick..."
:gandarf "I can transport you to the land where her prision lies."
:gandarf "But it is far out of my sight, and I know not what you'll find."
:gandarf "Well? What say you?"
:ego "I'll do it! "
:gandarf "Very good."
:gandarf "Prepare yourself.")
(Thread/sleep 300)
(actions/talk entities :gandarf "Beamium Up!!!" :anim :talk-angry)
:gandarf "I have escaped!"
:gandarf "And I brought someone with me!")
(Thread/sleep 600)
(actions/talk entities :gandarf "Beautius appearium!!" :anim :talk-angry)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :reset)
(particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :start)
(disappear entities)
(Thread/sleep 2000)
(georgia-appear entities)
(actions/do-stop entities :ego :face :left)
(Thread/sleep 3000)
(actions/do-dialogue entities
:georgia "Hey, I'm home!"
:georgia "Tick, was it really you that saved me?"
:ego "Aww, it was nothing."
:georgia "My hero!"
:frankie "Wait a hot second!")
(Thread/sleep 500)
(actions/walk-straight-to entities :frankie [85 24] :anim :stand)
(actions/do-dialogue entities
:frankie "Come along, Georgia."
:frankie "No sense in thanking Dipstick.")
(actions/play-animation entities :frankie :laugh)
(actions/play-animation entities :georgia :kick)
(actions/walk-straight-to entities :frankie [-41 24] :anim :stand :speed 5.0)
(actions/do-dialogue entities
:georgia "Let's go, Sir Hunk.")
(fade-out entities)
(on-gl (set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.credits/credits)))
)

View File

@@ -14,7 +14,8 @@
[play-clj.math :refer :all]
[play-clj.ui :refer :all]
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
[play-clj.g2d :refer :all])
(:import [com.badlogic.gdx.graphics Color]))
(defn make [screen]
(let [
@@ -34,6 +35,12 @@
duke-reach (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [3 4 5 6])
duke-reach-talk (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [6 7])
duke-knight (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [8 9 10 9 8])
georgia-stand (utils/make-anim "georgia/stand.png" [20 43] 0.2 (flatten [(repeat 20 0) 1 (repeat 10 0) 1]))
georgia-talk (utils/make-anim "georgia/stand.png" [20 43] 0.2 (flatten [0 2 0 2 0 1 0 0 2]))
georgia-kick (utils/make-anim-seq "georgia/kick" [40 43] 0.1 (flatten [(repeat 10 0) (repeat 7 1) (repeat 7 2)
3 4 5 6 7 8 9 10 11 12 13 (repeat 10 14)
15 16 17 18 19 (repeat 10 0)]))
scaler (utils/scaler-fn-with-baseline 20 0.01 1.20)]
(rooms/make :music :dream
:name "Ending"
@@ -42,6 +49,19 @@
(assoc (utils/get-texture "ending-castle/ending-castle2-assets/foreground.png") :x 160 :y 0 :origin-x 165 :origin-y 5 :baseline 240 :parallax 1.4)]
:apply-state (fn [screen e]
(update-in e [:room :entities :ego] dissoc :talk-override ))
:georgia (rooms/make-entity :georgia (assoc (animation->texture screen georgia-stand)
:x 101 :y 23 :baseline 217
:scale-x 1.2
:scale-y 1.2
:talk-color (Color/valueOf "ffabe0ff")
:opacity 0.0
:anim georgia-stand
:anim-start 0
:stand georgia-stand
:talk georgia-talk
:kick georgia-kick
:anim-merges {georgia-stand {:origin-x 10 :origin-y 0}
georgia-kick {:origin-x 20 :origin-y 0}}))
:entities {:peddler (assoc (animation->texture screen peddler-stand)
:x 245 :y 46 :baseline 200
:anim peddler-stand
@@ -52,8 +72,11 @@
:anim warden-stand
:anim-start 0
:scale-x 1.1
:scale-y 1.1
)
:scale-y 1.1)
:frankie (assoc (common/make-frankie screen)
:x 28 :y 21 :baseline 200
:scale-x 1.2
:scale-y 1.2)
:gandarf (assoc (common/make-wizard screen {:x 205 :y 400 :baseline 199})
:update-fn (fn [screen entities gandarf]
(assoc gandarf :y (or (get-in entities [:gandarf-cloud :y])
@@ -71,9 +94,9 @@
:reach duke-reach
:reach-talk duke-reach-talk
:knight duke-knight)
:magic-frog-particle (doto (assoc (particle-effect "particles/magic-frog") :x 140 :y 49
:magic-frog-particle (doto (assoc (particle-effect "particles/magic-frog") :x 91 :y 23
:baseline 241)
(particle-effect! :set-position 150 49))
(particle-effect! :set-position 91 23))
:ladder-guard-1 (assoc (animation->texture screen ladder-guard-stand-1)
:x 75 :y 69 :baseline (- 240 69)
:anim ladder-guard-stand-1

View File

@@ -84,6 +84,7 @@
:entities {:bloodclot-head (assoc (animation->texture screen bloodclot-stand)
:x 211 :y 115 :baseline 240
:origin-x 57 :origin-y 0
:talk-color (color 0.95 0.4 0.2 1.0)
:stand bloodclot-stand
:talk bloodclot-talk
:anim bloodclot-stand