cat tree uses atlas.

This commit is contained in:
Bryce Covert
2017-05-28 06:54:31 -07:00
parent 0ad38547f3
commit 0263bb7223
38 changed files with 172 additions and 164 deletions

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -2,7 +2,7 @@
(def packs (into ["do"]
(mapcat (fn [directory]
["run" "-m" "com.badlogic.gdx.tools.texturepacker.TexturePacker" (str "asset-work/" directory) "resources/packed/" (str directory ",")])
["global" "title"]
["cat-tree"]
#_["behindhouse" "dream" "georgia" "inside-cafeteria" "inside-jail" "outsidehouse" "safe-song" "title"
"castle-gate" "ego" "held" "inside-castle" "inside-stash" "outside-castle" "screenshots" "wizard"
"cat-tree" "ending-castle" "inside-antique" "inside-house" "outside-jail" "space" ])))

View File

@@ -60,97 +60,97 @@ dot
orig: 1, 1
offset: 0, 0
index: -1
eye-1
eye
rotate: false
xy: 444, 70
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-6
index: 0
eye
rotate: false
xy: 444, 70
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-10
rotate: false
xy: 628, 96
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-11
rotate: false
xy: 674, 96
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-12
rotate: false
xy: 582, 46
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-13
rotate: false
xy: 628, 46
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-2
index: 5
eye
rotate: false
xy: 444, 20
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-3
index: 1
eye
rotate: false
xy: 490, 100
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-4
index: 2
eye
rotate: false
xy: 490, 50
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-5
index: 3
eye
rotate: false
xy: 536, 100
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-7
index: 4
eye
rotate: false
xy: 536, 100
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-8
index: 6
eye
rotate: false
xy: 536, 50
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
eye-9
index: 7
eye
rotate: false
xy: 582, 96
size: 44, 48
orig: 44, 48
offset: 0, 0
index: -1
index: 8
eye
rotate: false
xy: 628, 96
size: 44, 48
orig: 44, 48
offset: 0, 0
index: 9
eye
rotate: false
xy: 674, 96
size: 44, 48
orig: 44, 48
offset: 0, 0
index: 10
eye
rotate: false
xy: 582, 46
size: 44, 48
orig: 44, 48
offset: 0, 0
index: 11
eye
rotate: false
xy: 628, 46
size: 44, 48
orig: 44, 48
offset: 0, 0
index: 12
grandma
rotate: false
xy: 324, 192
@@ -158,146 +158,146 @@ grandma
orig: 275, 36
offset: 0, 0
index: -1
grandma-cry-1
grandma-cry
rotate: false
xy: 713, 430
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-10
rotate: false
xy: 773, 388
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-11
rotate: false
xy: 384, 36
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-12
rotate: false
xy: 713, 304
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-13
rotate: false
xy: 773, 346
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-14
rotate: false
xy: 713, 262
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-15
rotate: false
xy: 773, 304
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-16
rotate: false
xy: 773, 262
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-17
rotate: false
xy: 601, 188
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-18
rotate: false
xy: 598, 146
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-19
rotate: false
xy: 661, 188
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-2
index: 0
grandma-cry
rotate: false
xy: 324, 78
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-20
rotate: false
xy: 658, 146
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-3
index: 1
grandma-cry
rotate: false
xy: 478, 150
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-4
index: 2
grandma-cry
rotate: false
xy: 713, 388
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-5
index: 3
grandma-cry
rotate: false
xy: 773, 430
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-6
index: 4
grandma-cry
rotate: false
xy: 324, 36
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-7
index: 5
grandma-cry
rotate: false
xy: 384, 78
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-8
index: 6
grandma-cry
rotate: false
xy: 538, 150
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
grandma-cry-9
index: 7
grandma-cry
rotate: false
xy: 713, 346
size: 58, 40
orig: 58, 40
offset: 0, 0
index: -1
index: 8
grandma-cry
rotate: false
xy: 773, 388
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 9
grandma-cry
rotate: false
xy: 384, 36
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 10
grandma-cry
rotate: false
xy: 713, 304
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 11
grandma-cry
rotate: false
xy: 773, 346
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 12
grandma-cry
rotate: false
xy: 713, 262
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 13
grandma-cry
rotate: false
xy: 773, 304
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 14
grandma-cry
rotate: false
xy: 773, 262
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 15
grandma-cry
rotate: false
xy: 601, 188
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 16
grandma-cry
rotate: false
xy: 598, 146
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 17
grandma-cry
rotate: false
xy: 661, 188
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 18
grandma-cry
rotate: false
xy: 658, 146
size: 58, 40
orig: 58, 40
offset: 0, 0
index: 19
inventory
rotate: false
xy: 674, 52
@@ -305,6 +305,13 @@ inventory
orig: 42, 42
offset: 0, 0
index: -1
ladder
rotate: false
xy: 490, 10
size: 29, 38
orig: 29, 38
offset: 0, 0
index: -1
monocle
rotate: false
xy: 202, 19

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

@@ -243,26 +243,27 @@
(actions/add-entity entities :blank (get-in @entities [:room :blank])))}})
(defn make [screen]
(let [cat-stand-sheet (texture! (utils/get-texture "cat-tree/cat-stand.png") :split 22 10)
(let [[screen atlas] (utils/acquire-atlas screen "packed/cat-tree.atlas")
cat-stand-sheet (texture! (utils/atlas->texture atlas "cat-stand") :split 22 10)
cat-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 1 (repeat 10 0) 2 3 4 3 0 0 2 3 4 3 (repeat 10 0) 1 1 (repeat 10 0) 5 5 6 6 7 (repeat 10 [7 8]) 6 5 0])]
(aget cat-stand-sheet 0 i)))
cat-walk (animation 0.2 [(utils/get-texture "cat-tree/pounce.png")])
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
cat-walk (animation 0.2 [(utils/atlas->texture atlas "pounce")])
destroy-ladder (utils/make-anim atlas "destroy-ladder" [29 38] 0.1 (range 18))
ladder-entity (assoc (utils/atlas->texture atlas "ladder") :x 130 :y 60 :baseline 162
:origin-x 0
: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.6]}})
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])
grandma-talk (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 2 0 2 0 2 0 2 0 2 0 1 0 2 0 0])
grandma-kiss (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 8 9 10 9 10 9 10 9 8 0])
grandma-cry (utils/make-anim-seq "cat-tree/grandma-cry" [58 40] 0.15 (flatten [(range 20) 0 0 0 0 0 0 0 0 0]))
owl-stand (utils/make-anim "cat-tree/owl.png" [21 30] 0.2 [0 0 0 0 0 0 0 2])
owl-talk (utils/make-anim "cat-tree/owl.png" [21 30] 0.2 [1 0 1 0 1 0 0 0 2 0])
owl-puke (utils/make-anim "cat-tree/owl.png" [21 30] 0.10 [0 0 2 2 3 2 2 3 3 2 3 3 3 4 5 6 7 4 4 3 3 2 2 2 2 2])
owl-eye (utils/make-anim-seq "cat-tree/eye" [44 48] 0.10 [0 0 1 1 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 3 4 4 4 3 4 4 4 5 6 7 8 9 9 9 9 9 9 9 9 9 10 11 12 12 11 10 9 9 9 9 9 9 9 9 10 11 12 12 12 11 10 9 9 9 9 9 8 7 6 5])
grandma-stand (utils/make-anim atlas "grandma" [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 atlas "grandma" [25 36] 0.2 [3 4 5 5 5 5 5])
grandma-squat-2 (utils/make-anim atlas "grandma" [25 36] 0.2 [5 5 4 3])
grandma-talk (utils/make-anim atlas "grandma" [25 36] 0.2 [0 2 0 2 0 2 0 2 0 2 0 1 0 2 0 0])
grandma-kiss (utils/make-anim atlas "grandma" [25 36] 0.2 [0 8 9 10 9 10 9 10 9 8 0])
grandma-cry (utils/make-anim-seq atlas "grandma-cry" [58 40] 0.15 (flatten [(range 20) 0 0 0 0 0 0 0 0 0]))
owl-stand (utils/make-anim atlas "owl" [21 30] 0.2 [0 0 0 0 0 0 0 2])
owl-talk (utils/make-anim atlas "owl" [21 30] 0.2 [1 0 1 0 1 0 0 0 2 0])
owl-puke (utils/make-anim atlas "owl" [21 30] 0.10 [0 0 2 2 3 2 2 3 3 2 3 3 3 4 5 6 7 4 4 3 3 2 2 2 2 2])
owl-eye (utils/make-anim-seq atlas "eye" [44 48] 0.10 [0 0 1 1 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 3 4 4 4 3 4 4 4 5 6 7 8 9 9 9 9 9 9 9 9 9 10 11 12 12 11 10 9 9 9 9 9 9 9 9 10 11 12 12 12 11 10 9 9 9 9 9 8 7 6 5])
puke (particle-effect "particles/puke")]
(rooms/make :music {:day :town-2 :night :night}
:name "Tree"
@@ -339,14 +340,14 @@
(if (get-in @entities [:room :entities :ladder])
(actions/do-stop entities :ego :face :right))))
}}
:layers {:day [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
(assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]
:night [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
(assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]}
:layers {:day [(assoc (utils/atlas->texture atlas "background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/atlas->texture atlas "tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (utils/atlas->texture atlas "brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
(assoc (utils/atlas->texture atlas "tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]
:night [(assoc (utils/atlas->texture atlas "background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/atlas->texture atlas "tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (utils/atlas->texture atlas "brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
(assoc (utils/atlas->texture atlas "tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]}
:entities {
:outside-particles (common/make-outside-particles)
:cat (actions/start-animation screen