Progress on ending.

This commit is contained in:
2015-05-16 11:04:28 -07:00
parent 8cf69e5b77
commit 772c3da3f6
34 changed files with 738 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
</array>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
</array>
</plist>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -18,5 +18,17 @@
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
</array>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,276 @@
Untitled
- Delay -
active: false
- Duration -
lowMin: 1000.0
lowMax: 1000.0
- Count -
min: 0
max: 300
- Emission -
lowMin: 0.0
lowMax: 0.0
highMin: 200.0
highMax: 50.0
relative: false
scalingCount: 2
scaling0: 1.0
scaling1: 0.63265306
timelineCount: 2
timeline0: 0.0
timeline1: 1.0
- Life -
lowMin: 0.0
lowMax: 0.0
highMin: 3000.0
highMax: 3000.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Life Offset -
active: false
- X Offset -
active: false
- Y Offset -
active: false
- Spawn Shape -
shape: point
- Spawn Width -
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Spawn Height -
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Scale -
lowMin: 0.0
lowMax: 0.0
highMin: 32.0
highMax: 32.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Velocity -
active: true
lowMin: 75.0
lowMax: 75.0
highMin: 800.0
highMax: 800.0
relative: false
scalingCount: 3
scaling0: 1.0
scaling1: 0.8979592
scaling2: 0.3877551
timelineCount: 3
timeline0: 0.0
timeline1: 0.11643836
timeline2: 1.0
- Angle -
active: true
lowMin: -90.0
lowMax: -90.0
highMin: 0.0
highMax: 360.0
relative: false
scalingCount: 2
scaling0: 1.0
scaling1: 1.0
timelineCount: 2
timeline0: 0.0
timeline1: 0.4178082
- Rotation -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 3600.0
highMax: -3600.0
relative: false
scalingCount: 2
scaling0: 0.3265306
scaling1: 1.0
timelineCount: 2
timeline0: 0.0
timeline1: 1.0
- Wind -
active: false
- Gravity -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 3
scaling0: 1.0
scaling1: 1.0
scaling2: 1.0
timelineCount: 3
timeline0: 0.0
timeline1: 0.15068494
timeline2: 0.48630136
- Tint -
colorsCount: 3
colors0: 1.0
colors1: 1.0
colors2: 1.0
timelineCount: 1
timeline0: 0.0
- Transparency -
lowMin: 0.0
lowMax: 0.0
highMin: 1.0
highMax: 1.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Options -
attached: false
continuous: false
aligned: false
additive: false
behind: false
premultipliedAlpha: false
- Image Path -
flesh.png
Untitled
- Delay -
active: false
- Duration -
lowMin: 1000.0
lowMax: 1000.0
- Count -
min: 0
max: 500
- Emission -
lowMin: 0.0
lowMax: 0.0
highMin: 500.0
highMax: 500.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Life -
lowMin: 0.0
lowMax: 0.0
highMin: 500.0
highMax: 500.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Life Offset -
active: false
- X Offset -
active: false
- Y Offset -
active: false
- Spawn Shape -
shape: point
- Spawn Width -
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Spawn Height -
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Scale -
lowMin: 0.0
lowMax: 0.0
highMin: 1.0
highMax: 8.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Velocity -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 500.0
highMax: 500.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Angle -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 360.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Rotation -
active: false
- Wind -
active: false
- Gravity -
active: false
- Tint -
colorsCount: 3
colors0: 1.0
colors1: 0.10980392
colors2: 0.03137255
timelineCount: 1
timeline0: 0.0
- Transparency -
lowMin: 0.0
lowMax: 0.0
highMin: 1.0
highMax: 1.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Options -
attached: false
continuous: false
aligned: false
additive: false
behind: false
premultipliedAlpha: false
- Image Path -
dot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,291 @@
Untitled
- Delay -
active: false
- Duration -
lowMin: 300.0
lowMax: 300.0
- Count -
min: 0
max: 300
- Emission -
lowMin: 0.0
lowMax: 0.0
highMin: 400.0
highMax: 50.0
relative: false
scalingCount: 2
scaling0: 1.0
scaling1: 0.63265306
timelineCount: 2
timeline0: 0.0
timeline1: 1.0
- Life -
lowMin: 0.0
lowMax: 0.0
highMin: 3000.0
highMax: 3000.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Life Offset -
active: false
- X Offset -
active: false
- Y Offset -
active: false
- Spawn Shape -
shape: point
- Spawn Width -
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Spawn Height -
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Scale -
lowMin: 0.0
lowMax: 0.0
highMin: 14.0
highMax: 14.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Velocity -
active: true
lowMin: 75.0
lowMax: 75.0
highMin: 300.0
highMax: 300.0
relative: false
scalingCount: 3
scaling0: 1.0
scaling1: 0.8979592
scaling2: 0.3877551
timelineCount: 3
timeline0: 0.0
timeline1: 0.11643836
timeline2: 1.0
- Angle -
active: true
lowMin: -90.0
lowMax: -90.0
highMin: 0.0
highMax: 360.0
relative: false
scalingCount: 2
scaling0: 1.0
scaling1: 1.0
timelineCount: 2
timeline0: 0.0
timeline1: 0.4178082
- Rotation -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 3600.0
highMax: -3600.0
relative: false
scalingCount: 2
scaling0: 0.3265306
scaling1: 1.0
timelineCount: 2
timeline0: 0.0
timeline1: 1.0
- Wind -
active: false
- Gravity -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 3
scaling0: 1.0
scaling1: 1.0
scaling2: 1.0
timelineCount: 3
timeline0: 0.0
timeline1: 0.15068494
timeline2: 0.48630136
- Tint -
colorsCount: 3
colors0: 1.0
colors1: 1.0
colors2: 1.0
timelineCount: 1
timeline0: 0.0
- Transparency -
lowMin: 0.0
lowMax: 0.0
highMin: 1.0
highMax: 1.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Options -
attached: false
continuous: false
aligned: false
additive: false
behind: false
premultipliedAlpha: false
- Image Path -
flesh.png
Untitled
- Delay -
active: false
- Duration -
lowMin: 300.0
lowMax: 300.0
- Count -
min: 0
max: 500
- Emission -
lowMin: 0.0
lowMax: 0.0
highMin: 500.0
highMax: 500.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Life -
lowMin: 0.0
lowMax: 0.0
highMin: 500.0
highMax: 500.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Life Offset -
active: false
- X Offset -
active: false
- Y Offset -
active: false
- Spawn Shape -
shape: point
- Spawn Width -
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Spawn Height -
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Scale -
lowMin: 1.0
lowMax: 1.0
highMin: 5.0
highMax: 3.0
relative: false
scalingCount: 2
scaling0: 1.0
scaling1: 0.0
timelineCount: 2
timeline0: 0.0
timeline1: 1.0
- Velocity -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 200.0
highMax: 200.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Angle -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: -360.0
highMax: 360.0
relative: false
scalingCount: 2
scaling0: 1.0
scaling1: 1.0
timelineCount: 2
timeline0: 0.0
timeline1: 1.0
- Rotation -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 360.0
highMax: -360.0
relative: false
scalingCount: 2
scaling0: 0.0
scaling1: 1.0
timelineCount: 2
timeline0: 0.0
timeline1: 1.0
- Wind -
active: false
- Gravity -
active: false
- Tint -
colorsCount: 3
colors0: 1.0
colors1: 0.101960786
colors2: 0.03137255
timelineCount: 1
timeline0: 0.0
- Transparency -
lowMin: 0.0
lowMax: 0.0
highMin: 1.0
highMax: 1.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Options -
attached: false
continuous: false
aligned: false
additive: false
behind: false
premultipliedAlpha: false
- Image Path -
dot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1 +1 @@
{:sound-volume 0.0, :music-volume 0.0}
{:sound-volume 52.0, :music-volume 88.0}

View File

@@ -622,8 +622,8 @@
old-music (get-music (get-in entities [:room :music]) (get-in entities [:state :time]))
entities (as-> entities e
(assoc-in e [:room] (get-in entities [:rooms new-background]))
(if between (between screen e) e)
(assoc-in e [:room :entities :ego] ego)
(if between (between screen e) e)
(assoc-in e [:state :last-room] new-background)
(assoc-in e [:tweens :fade-in] (tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 time))
(if-not (get-in entities [:cam :paused?])

View File

@@ -5,6 +5,7 @@
[advent.screens.items :as items]
[advent.utils :as utils]
[advent.pathfind]
[advent.tween :as tween]
[clojure.zip :as zip]
[play-clj.core :refer :all]
[play-clj.ui :refer :all]
@@ -96,6 +97,70 @@
((rand-nth [listen-1 listen-2 listen-3]) entities))
(defn explode [entities]
(actions/run-action entities
(begin [this screen entities]
(-> entities
(update-in [:room :entities :bloodclot] #(actions/start-animation screen % :explode))
(update-in [:room :entities] dissoc :bloodclot-head)
(assoc-in [:room :entities :ego :facing] :right)
(update-in [:room :entities :ego] #(actions/start-animation screen % :crawl))))
(continue [this screen entities]
(if (= 170 (get-in entities [:room :entities :bloodclot :current-frame-index]))
(particle-effect! (get-in entities [:room :entities :grow-explode]) :start))
(let [move-speed (* 0.17
(/ (:delta-time screen)
(/ 1.0 60.0)))
entities (update-in entities [:room :entities :ego :x] #(max 80 (- % move-speed)))]
(if (= 80 (get-in entities [:room :entities :ego :x]))
(update-in entities [:room :entities :ego] #(actions/start-animation screen % :crawl-hide))
entities )))
(done? [this screen entities]
(= (get-in entities [:room :entities :bloodclot :current-frame-index]) 176))
(terminate [this screen entities]
(-> entities
(update-in [:room :entities] dissoc :bloodclot)
(assoc-in [:tweens :flash] (tween/tween :flash screen [:white-fade :opacity] 0.0 1.0 0.2 :ease tween/ease-in-cubic))))
(can-skip? [this screen entities]
false))
(actions/run-action entities
(begin [this screen entities]
entities)
(continue [this screen entities]
entities)
(done? [this screen entities]
(not (get-in entities [:tweens :flash])))
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false))
(actions/run-action entities
(begin [this screen entities]
(assoc-in entities [:tweens :flash] (tween/tween :flash screen [:white-fade :opacity] 1.0 0.0 4.0 :ease tween/ease-in-cubic)))
(continue [this screen entities]
entities)
(done? [this screen entities]
(not (get-in entities [:tweens :flash])))
(terminate [this screen entities]
(update-in entities [:room :entities :ego] dissoc :stand-override))
(can-skip? [this screen entities]
false)))
(defn win []
(actions/get-script entities
(actions/do-dialogue entities
@@ -103,13 +168,17 @@
:ego "I have this potion which will make me as strong as you!"
:bloodclot-head "What?!"
:bloodclot-head "Give it here!")
(actions/transition-background entities :space [200 45])
(actions/transition-background entities :space [200 45] :between (fn [s e]
(-> e
(assoc-in [:room :entities :ego :stand-override] :crawl-stand)
(update-in [:room :entities :ego] #(actions/start-animation s % :crawl-stand)))
))
(actions/do-dialogue entities
:bloodclot-head "Yes!"
:bloodclot-head "Ultimate power is mine!"
:bloodclot-head "If I drink this entire bottle, I'll be as powerful as a god!")
(actions/remove-entity entities :bloodclot-head)
#_(particle-effect! (get-in @entities [:room :entities :blowup] ) :start)
(actions/play-animation entities :bloodclot :explode)
(Thread/sleep 15000)))
(explode entities)
(actions/play-animation entities :ego :standup)
(Thread/sleep 15000)
))

View File

@@ -182,7 +182,8 @@
bloodclot-explode (utils/make-anim "space/bloodclot-explode.png" [106 165] 0.075 [0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 5 5 5 4 4 4 4 5 5 5 5 5 4 4 4 4 5 5 4 4 4 4 5 5 5 4 5 5 5 5 5 5 5 5 6 5 5 5 5 6 6 5 5 5 5 5 5 5 6 6 6 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 7 6 7 7 5 6 6 6 6 6 7 7 7 7 6 6 6 6 6 6 6 6 6 6 7 7 7 7 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 10 11 12 13 14 15 16 17 18 19])
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 "space/appear")
blowup-effect (particle-effect "space/blowup")]
blowup-effect (particle-effect "space/blowup")
grow-explode (particle-effect "space/grow-explode")]
(rooms/make :music :fight
:interactions
{}
@@ -192,6 +193,9 @@
:entities {:appear (assoc effect
:x 240 :y 50
:baseline 200)
:grow-explode (assoc grow-explode
:x 240 :y 130
:baseline 200)
:blowup (assoc blowup-effect
:x 225 :y 175
:baseline 240)

View File

@@ -364,7 +364,11 @@ void main()
axe (utils/make-anim "ego/axe.png" [60 70] 0.10 (flatten [1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 (range 7)]))
axe-wood (utils/make-anim "ego/axe-wood.png" [60 70] 0.10 (flatten [1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 (range 11)]))
suspended (utils/make-anim "ego/suspended.png" [18 36] 0.10 [0])
suspended-talk (utils/make-anim "ego/suspended.png" [18 36] 0.20 [0 1])
suspended-talk (utils/make-anim "ego/suspended.png" [18 36] 0.20 (range 7))
crawl (utils/make-anim "ego/crawl.png" [39 25] 0.2 (range 4))
crawl-stand (utils/make-anim "ego/crawl.png" [39 25] 0.2 [0])
crawl-hide (utils/make-anim "ego/crawl.png" [39 25] 0.1 (flatten [(repeat 10 3) (range 4 7) (repeat 50 6) (reverse (range 4 7) ) (repeat 20 3)]))
standup (utils/make-anim "ego/standup.png" [45 55] 0.2 (range 5))
ego {:right {:walk walk-right
:stand stand-anim
@@ -411,6 +415,10 @@ void main()
:axe-wood axe-wood
:suspended suspended
:suspended-talk suspended-talk
:crawl crawl
:crawl-stand crawl-stand
:crawl-hide crawl-hide
:standup standup
}
:left {:walk (utils/flip walk-right)
:stand (utils/flip stand-anim)
@@ -448,6 +456,10 @@ void main()
:axe-wood (utils/flip axe-wood)
:suspended (utils/flip suspended)
:suspended-talk (utils/flip suspended-talk)
:crawl (utils/flip crawl)
:crawl-stand (utils/flip crawl-stand)
:crawl-hide (utils/flip crawl-hide)
:standup (utils/flip standup)
}
:baseline (- 240 (last start-pos))
:facing :right
@@ -534,6 +546,10 @@ void main()
:anim-merges {(get-in ego [:right :shock]) {:origin-x 15}
(get-in ego [:left :swing-shovel]) {:origin-x 26}
(get-in ego [:right :swing-shovel]) {:origin-x 26}
(get-in ego [:right :standup]) {:origin-x 32}
(get-in ego [:right :crawl]) {:origin-x 32}
(get-in ego [:right :crawl-hide]) {:origin-x 32}
(get-in ego [:right :crawl-stand]) {:origin-x 32}
(get-in ego [:right :axe]) {:origin-x 17}
(get-in ego [:right :axe-wood]) {:origin-x 17}
(get-in ego [:left :love]) {:origin-x 36}