lots of tweaks.

This commit is contained in:
Bryce Covert
2015-10-10 11:04:44 -07:00
parent 2feaf36c87
commit 5981c1d303
37 changed files with 1452 additions and 1024 deletions

BIN
desktop/asset-work/door.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,18 @@
<?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>
</array>
</plist>

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

@@ -16,8 +16,6 @@ IOS
AUDIO
+ blink
+ scratch
+ peddler scratch
+ sheep
+ candles
+ magic hands
+ gandarf explosion
@@ -33,8 +31,6 @@ AUDIO
+ ladder break
+ eavesdrop
+ milking
+ angus
+ writing
+ antique sigh
+ bloodclot grunt
+ bloodclot explode

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 77 KiB

View File

@@ -0,0 +1,304 @@
base
- Delay -
active: false
- Duration -
lowMin: 2000.0
lowMax: 2000.0
- Count -
min: 0
max: 10
- Emission -
lowMin: 0.0
lowMax: 0.0
highMin: 3.0
highMax: 3.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Life -
lowMin: 0.0
lowMax: 0.0
highMin: 1000.0
highMax: 1000.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: 30.0
lowMax: 30.0
highMin: 40.0
highMax: 40.0
relative: false
scalingCount: 7
scaling0: 0.6122449
scaling1: 0.7755102
scaling2: 0.877551
scaling3: 0.7755102
scaling4: 0.9183673
scaling5: 0.877551
scaling6: 1.0
timelineCount: 7
timeline0: 0.0
timeline1: 0.10273973
timeline2: 0.28767124
timeline3: 0.46575344
timeline4: 0.67808217
timeline5: 0.8287671
timeline6: 1.0
- Velocity -
active: false
- Angle -
active: false
- Rotation -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 40.0
highMax: -40.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: 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: 6
scaling0: 0.12280702
scaling1: 0.57894737
scaling2: 0.5263158
scaling3: 0.61403507
scaling4: 0.64912283
scaling5: 0.24561404
timelineCount: 6
timeline0: 0.0
timeline1: 0.09589041
timeline2: 0.3561644
timeline3: 0.60958904
timeline4: 0.8835617
timeline5: 1.0
- Options -
attached: false
continuous: true
aligned: false
additive: true
behind: false
premultipliedAlpha: false
- Image Path -
cloud-georgia.png
top
- Delay -
active: false
- Duration -
lowMin: 3000.0
lowMax: 3000.0
- Count -
min: 0
max: 15
- Emission -
lowMin: 0.0
lowMax: 0.0
highMin: 10.0
highMax: 10.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Life -
lowMin: 0.0
lowMax: 0.0
highMin: 2000.0
highMax: 2000.0
relative: false
scalingCount: 3
scaling0: 1.0
scaling1: 1.0
scaling2: 0.3
timelineCount: 3
timeline0: 0.0
timeline1: 0.66
timeline2: 1.0
- Life Offset -
active: false
- X Offset -
active: true
lowMin: -15.0
lowMax: 15.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Y Offset -
active: true
lowMin: -15.0
lowMax: 15.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- 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: 15.0
lowMax: 10.0
highMin: 0.0
highMax: 10.0
relative: true
scalingCount: 2
scaling0: 0.0
scaling1: 1.0
timelineCount: 2
timeline0: 0.0
timeline1: 1.0
- Velocity -
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 4.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Angle -
active: true
lowMin: 90.0
lowMax: 90.0
highMin: 0.0
highMax: 360.0
relative: false
scalingCount: 3
scaling0: 1.0
scaling1: 1.0
scaling2: 1.0
timelineCount: 3
timeline0: 0.0
timeline1: 0.5
timeline2: 1.0
- Rotation -
active: true
lowMin: 1.0
lowMax: 360.0
highMin: -20.0
highMax: 20.0
relative: true
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.9647059
colors2: 0.9647059
timelineCount: 1
timeline0: 0.0
- Transparency -
lowMin: 0.0
lowMax: 0.0
highMin: 1.0
highMax: 1.0
relative: false
scalingCount: 4
scaling0: 0.0
scaling1: 1.0
scaling2: 0.5614035
scaling3: 0.0
timelineCount: 4
timeline0: 0.0
timeline1: 0.2
timeline2: 0.5479452
timeline3: 1.0
- Options -
attached: false
continuous: true
aligned: false
additive: true
behind: false
premultipliedAlpha: false
- Image Path -
cloud-georgia.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -796,3 +796,66 @@
(play-animation entities :ego :love)
(actions/update-state entities (fn [s] (assoc s :has-seen-love? true)))
(transition-music entities nil :duration 1.0))))
(defn fade-in-georgia [entities]
(actions/run-action entities
(begin [this screen entities]
(particle-effect! (get-in entities [:room :entities :georgia-cloud]) :reset)
(particle-effect! (get-in entities [:room :entities :georgia-cloud]) :start)
(-> entities
(assoc-in [:room :entities :georgia-face :x] (- (get-in entities [:room :entities :ego :x]) 30))
(assoc-in [:room :entities :georgia-face :y] (+ (get-in entities [:room :entities :ego :y]) 30))
(assoc-in [:room :entities :georgia-cloud :x] (- (get-in entities [:room :entities :ego :x]) 30))
(assoc-in [:room :entities :georgia-cloud :y] (+ (get-in entities [:room :entities :ego :y]) 30))
(assoc-in [:tweens :fade-georgia]
(tween/tween :fade-georgia screen [:room :entities :georgia-face :opacity] 0.0 1.0 1.0 :ease tween/ease-in-cubic))))
(continue [this screen entities]
(assoc-in entities [:room :entities :georgia-cloud :opacity] (get-in entities [:room :entities :georgia-face :opacity])))
(done? [this screen entities]
(nil? (get-in entities [:tweens :fade-georgia])))
(terminate [this screen entities]
entities)
(skip-type [this screen entities]
:none)))
(defn fade-out-georgia [entities]
(actions/run-action entities
(begin [this screen entities]
(particle-effect! (get-in entities [:room :entities :georgia-cloud]) :allow-completion)
(-> entities
(assoc-in [:tweens :fade-georgia]
(tween/tween :fade-georgia screen [:room :entities :georgia-face :opacity] 1.0 0.0 1.0 :ease tween/ease-in-cubic))))
(continue [this screen entities]
entities)
(done? [this screen entities]
(nil? (get-in entities [:tweens :fade-georgia])))
(terminate [this screen entities]
entities)
(skip-type [this screen entities]
:none)))
(defn georgia-say [entities msg]
(fade-in-georgia entities)
(actions/talk entities :georgia-face msg)
(fade-out-georgia entities)
(transition-music entities nil :duration 1.0))
(defn in-love [entities]
(let [seen-love (get-in @entities [:state :has-seen-love?])]
(when (or (not seen-love)
(< (rand-int 10) 3))
(transition-music entities :love :duration 1.0)
(fade-in-georgia entities)
(play-animation entities :ego :love)
(actions/update-state entities (fn [s] (assoc s :has-seen-love? true)))
(fade-out-georgia entities)
(transition-music entities nil :duration 1.0))))

View File

@@ -46,7 +46,7 @@
(actions/has-obtained? entities :sword)
0.0
:else
(max 0.0 (- 1.0 (/ (utils/dist 45 97 (:x ego) (:y ego)) 50.0))))))
(* 0.2 (max 0.0 (- 1.0 (/ (utils/dist 45 97 (:x ego) (:y ego)) 50.0)))))))
(defn bloodclot-appear [entities]
(actions/run-action entities
@@ -341,7 +341,7 @@
game-player-stand-up (animation 0.15 (for [i [0 0 0 0 0 0 0 0 0 0 0 1]]
(aget game-player-talk-sheet 0 i)))
game-player-stand-down (utils/make-anim "inside-castle/brian-working.png" [40 44] 0.1 [0 1 1 2 0 2 2 1 0 2 2 2 2 2 1 1 ])
game-player-stand-down (utils/make-anim "inside-castle/brian-working.png" [40 44] 0.1 (flatten (repeat 4 [0 1 1 2 0 2 2 1 0 2 2 2 2 2 1 1 ])))
game-player-talk-down (utils/make-anim "inside-castle/brian-working.png" [40 44] 0.2 [2 3 2 2 3 2 3 2])
game-player-pause-from-work (utils/make-anim "inside-castle/brian-working.png" [40 44] 0.15 [2 3 4 5 6 7])
game-player-get-to-work (utils/make-anim "inside-castle/brian-working.png" [40 44] 0.15 (reverse [2 3 4 5 6 7]))
@@ -426,8 +426,8 @@
:script (actions/get-script entities
(actions/do-dialogue entities
:ego "That's Georgia McGorgeous' house."
:ego "One day, when I'm a knight, I'll ask her to be my girlfriend.")
(actions/in-love entities))}}
:ego "One day, when I'm a knight, she'll say...")
(actions/georgia-say entities "Kiss me, brave Sir Tick!"))}}
: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)
@@ -485,7 +485,7 @@
:x 160 :y 97 :baseline 99
:open door
:door-sound (utils/load-sound "door.ogg")
:anim-sound-frames {door {1 [:door-sound 1.0]}}
:anim-sound-frames {door {1 [:door-sound 0.1]}}
)
:sword (assoc (utils/get-texture "inside-castle/sword.png")
:x 22
@@ -526,6 +526,7 @@
:game-player (assoc (utils/get-texture "inside-castle/gameplayer.png") :x 266 :y 49 :baseline 191
:talk-color (color 1.0 0.3 0.2 1.0)
:script (actions/get-script entities (do-game-player-dialogue entities))
:writing-sound (utils/load-sound "inside-castle/writing.ogg")
:facing :left
:scripts #(condp = %
:wool (actions/get-script entities
@@ -602,7 +603,8 @@
:talk game-player-talk-up}
:get-to-work game-player-get-to-work
:pause-from-work game-player-pause-from-work
:anim-sound-frames {game-player-stand-up {11 [:blink 0.3] }}
:anim-sound-frames {game-player-stand-up {11 [:blink 0.3] }
game-player-stand-down {1 [:writing-sound 0.07]}}
:flex game-player-flex)}
:monocle (rooms/make-entity :monocle (assoc (animation->texture screen monocle)
:x 209 :y 160 :baseline 240

View File

@@ -14,7 +14,7 @@
(defn flies-vol [entities]
(utils/proximity-volume entities [201 175] :scale 0.5))
(utils/proximity-volume entities [201 175] :scale 0.20))
(defn do-initial-peddler-conversation [entities]
(actions/do-dialogue entities
@@ -361,6 +361,8 @@
:steer (actions/start-animation screen (assoc (animation->texture screen steer-stand) :x 203 :y 155 :baseline 80
:stand steer-stand
:night-profile :sprite
:moo (utils/load-sound "outside-castle/moo.ogg")
:anim-sound-frames {steer-stand {10 [:moo 0.2]}}
:script (actions/get-script entities
(actions/walk-to entities :ego [168 150] :face :right)
(actions/do-dialogue entities

View File

@@ -705,7 +705,9 @@
nil)
:eat-sound (utils/load-sound "outsidehouse/sheep-eat.ogg")
:anim-sound-frames {sheep-stand {11 [:eat-sound 1.0]}}
:bleet-sound (utils/load-sound "outsidehouse/sheep-bleet.ogg")
:anim-sound-frames {sheep-stand {11 [:eat-sound 0.3]
35 [:bleet-sound 0.5]}}
:left {:walk (utils/flip sheep-walk)
:stand (utils/flip sheep-stand)}
:right {:walk sheep-walk
@@ -722,7 +724,7 @@
:x 253 :y 88 :baseline 122
:open door
:door-sound (utils/load-sound "door.ogg")
:anim-sound-frames {door {1 [:door-sound 1.0]}}
:anim-sound-frames {door {1 [:door-sound 0.1]}}
)
:lamb (assoc (utils/get-texture "outsidehouse/lamb.png")
:x 10 :y 163 :baseline 77

View File

@@ -283,7 +283,7 @@
(as-> entities entities
(utils/play-sound! screen entities (get-in entities [:room :fountain-sound :sound])
(utils/sourced-volume-fn :fountain 0.25 [172 120])
(utils/sourced-volume-fn :fountain 0.15 [172 120])
(utils/get-sound-pan 172)
:loop)

View File

@@ -657,10 +657,10 @@ void main()
:x (first start-pos) :y (last start-pos)
:id "ego"}
ego (assoc ego :anim-sound-frames {(get-in ego [:left :walk]) {2 [choose-step-sound 0.6]
6 [choose-step-sound 0.6]}
(get-in ego [:right :walk]) {2 [choose-step-sound 0.6]
6 [choose-step-sound 0.6]}
ego (assoc ego :anim-sound-frames {(get-in ego [:left :walk]) {2 [choose-step-sound 0.3]
6 [choose-step-sound 0.3]}
(get-in ego [:right :walk]) {2 [choose-step-sound 0.3]
6 [choose-step-sound 0.3]}
(get-in ego [:left :talk] ) {2 [:blink 0.15]}
(get-in ego [:right :talk] ) {2 [:blink 0.15]}
@@ -841,7 +841,7 @@ void main()
[{:keys [id sound volume-fn]} & rest] (get-in entities [:current-sounds :value])]
(if id
(do
(sound! sound :set-volume id (volume-fn entities))
(sound! sound :set-volume id (utils/scale-vol-from-fade entities (volume-fn entities)))
(recur entities rest))
entities)))
@@ -926,6 +926,30 @@ void main()
(defn mouse-moved [{:keys [input-x input-y viewport] :as screen} [entities]]
(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])
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-face (rooms/make-entity :georgia-face
(assoc (animation->texture screen georgia-stand)
:talk georgia-talk
:anim georgia-stand
:stand georgia-stand
:talk-color (Color/valueOf "ffabe0ff")
:anim-start 0
:x 100 :y 100 :baseline 242 :origin-x 15 :origin-y 15
:opacity 0.0))
georgia-cloud (assoc (particle-effect "particles/cloud-georgia") :x 100 :y 100 :baseline 241 :opacity 0.0)]
(reduce (fn [rooms room-key]
(update-in rooms [room-key :entities]
assoc
:georgia-face georgia-face
:georgia-cloud georgia-cloud))
rooms
(keys rooms))))
(defscreen scene
:on-timer
(fn [screen [entities]]
@@ -958,11 +982,13 @@ void main()
:castle-gate (rooms.castle-gate/make screen)
:outside-jail (rooms.outside-jail/make screen)
:outside-castle (rooms.outside-castle/make screen)}
rooms (add-georgia-to-all-rooms screen rooms)
entities {:rooms rooms
:step-particles (assoc (particle-effect "particles/step") :x 100 :y 100 :baseline 241)
:cam {:zoom 0.95
:paused? false
:object nil}
:current-sounds {:object nil
:value []}
:musics {:object nil
@@ -1061,6 +1087,7 @@ void main()
entities (update-from-room screen entities)
entities (update-from-hotspots screen entities)
entities (assoc-in entities [:room :entities :ego :last-frame] (get-in entities [:room :entities :ego :object]))
entities (update-in entities [:room :entities] (fn [entities]
(into entities
(for [[id entity] entities]

View File

@@ -68,7 +68,10 @@
(defn snapshot-state [entities name]
(doto (.getPreferences (Gdx/app) "ticks-tales-saves")
(.putString (saves/saves name) (pr-str (entities :state)))
(.putString "snapshot-list" (pr-str (filter (complement #{"Autosave"} ) (cons (saves/saves name) (snapshot-list)))))
(.putString "snapshot-list" (pr-str (filter (complement #{"Autosave"})
(cons (saves/saves name)
(filter (complement #{(saves/saves name)})
(snapshot-list))))))
.flush))
(defn save [entities]
@@ -257,7 +260,8 @@
(defn load-sound [f]
(try
(sound f)
(catch Exception _
(catch Exception e
(println e)
(sound (str f ".mp3")))))
@@ -405,13 +409,16 @@
(defn sourced-volume-fn [target vol-scale [x y]]
(fn [entities]
(* (if (= target :ego)
(-> (* (/ (get-in entities [:room :entities :ego :scale-x]) 1.5) 0.75)
(* (or vol-scale 1.0))
(clamp-volume))
(proximity-volume entities [x y] :scale vol-scale))
(- 1.0 (get-in entities [:fade :opacity])))))
(if (= target :ego)
(-> (* (/ (get-in entities [:room :entities :ego :scale-x]) 1.5) 0.75)
(* (or vol-scale 1.0))
(clamp-volume))
(proximity-volume entities [x y] :scale vol-scale))
))
(defn scale-vol-from-fade [entities vol]
(* vol
(- 1.0 (get-in entities [:fade :opacity]))))
(defn play-sound!
([screen entities snd volume-fn]
@@ -423,8 +430,8 @@
([screen entities snd volume-fn pan type]
(let [vol (volume-fn entities)
sound-id (if (= :once type)
(sound! snd :play (current-sound-volume vol) 1.0 pan)
(sound! snd :loop (current-sound-volume vol) 1.0 pan)) ]
(sound! snd :play (scale-vol-from-fade entities (current-sound-volume vol)) 1.0 pan)
(sound! snd :loop (scale-vol-from-fade entities (current-sound-volume vol)) 1.0 pan)) ]
(update-in entities [:current-sounds :value]
conj {:id sound-id
:sound snd