Update existing animations to use the new onesheet tileset.

This commit is contained in:
David Thompson 2024-05-26 15:08:37 -04:00
parent aa0c826b3c
commit e2a23f7820
4 changed files with 25 additions and 27 deletions

View file

@ -63,7 +63,7 @@ serve: game.wasm
bundle: game.wasm bundle: game.wasm
rm cirkoban.zip || true rm cirkoban.zip || true
zip cirkoban.zip -r assets/images/*.png \ zip cirkoban.zip -r assets/images/cirkoban-onesheet.png \
assets/sounds/*.wav \ assets/sounds/*.wav \
assets/fonts/*.woff2 \ assets/fonts/*.woff2 \
reflect.js \ reflect.js \

View file

@ -76,8 +76,8 @@
;; Assets ;; Assets
(define tileset (define tileset
(make-tileset (make-image "assets/images/cirkoban.png") (make-tileset (make-image "assets/images/cirkoban-onesheet.png")
320 (* 240 4) 320 240
(inexact->exact tile-width) (inexact->exact tile-width)
(inexact->exact tile-height))) (inexact->exact tile-height)))
(define* (load-sound-effect name #:key (volume 0.25)) (define* (load-sound-effect name #:key (volume 0.25))
@ -358,30 +358,28 @@
(define name (define name
(make-animation tileset (vector (make-frame tile duration) ...)))) (make-animation tileset (vector (make-frame tile duration) ...))))
(define-animation anim:player (define-animation anim:player
(0 2.25) (0 6.75)
(300 2.25) (40 0.15))
(600 2.25)
(900 0.15))
(define-animation anim:electron-head (define-animation anim:electron-head
(4 .25) (4 .25)
(304 .25) (57 .25)
(604 .25) (77 .25)
(904 .25)) (97 .25))
(define-animation anim:electron-tail (define-animation anim:electron-tail
(5 .25) (5 .25)
(305 .25) (58 .25)
(605 .25) (78 .25)
(905 .25)) (98 .25))
(define-animation anim:gem (define-animation anim:gem
(28 .25) (28 .25)
(328 .25) (55 .25)
(628 .25) (75 .25)
(928 .25)) (95 .25))
(define-animation anim:ghost-gem (define-animation anim:ghost-gem
(49 .25) (49 .25)
(349 .25) (56 .25)
(649 .25) (76 .25)
(949 .25)) (96 .25))
(define number->string* (define number->string*
(let ((cache (make-eq-hashtable))) ; assuming fixnums only (let ((cache (make-eq-hashtable))) ; assuming fixnums only

View file

@ -7,7 +7,7 @@
105,18,24,24,24,24,24,24,24,18,106,189,105,65,61,61,61,61,24,86, 105,18,24,24,24,24,24,24,24,18,106,189,105,65,61,61,61,61,24,86,
105,24,31,24,24,24,87,103,102,103,104,189,105,62,24,24,24,24,3,106, 105,24,31,24,24,24,87,103,102,103,104,189,105,62,24,24,24,24,3,106,
105,24,24,19,24,24,106,191,170,90,210,169,85,62,20,24,31,24,24,86, 105,24,24,19,24,24,106,191,170,90,210,169,85,62,20,24,31,24,24,86,
101,103,103,103,88,24,86,131,190,81,83,82,108,62,31,15,324,31,24,106, 101,103,103,103,88,24,86,131,190,81,83,82,108,62,31,15,24,31,24,106,
191,209,130,209,85,24,86,151,171,105,65,61,61,63,24,24,19,24,24,106, 191,209,130,209,85,24,86,151,171,105,65,61,61,63,24,24,19,24,24,106,
129,91,81,83,108,24,106,110,90,85,62,87,103,103,103,102,102,103,102,104, 129,91,81,83,108,24,106,110,90,85,62,87,103,103,103,102,102,103,102,104,
191,189,105,24,24,24,106,171,189,105,62,106,149,210,89,171,91,81,82,84, 191,189,105,24,24,24,106,171,189,105,62,106,149,210,89,171,91,81,82,84,
@ -20,7 +20,7 @@
103,103,104,150,169,90,129,85,24,24,24,106,90,151,101,102,102,102,103,103 103,103,104,150,169,90,129,85,24,24,24,106,90,151,101,102,102,102,103,103
</data> </data>
</layer> </layer>
<objectgroup id="2" name="objects"> <objectgroup id="2" name="objects" visible="0">
<object id="1" type="player-spawn" gid="1" x="16" y="208" width="16" height="16"/> <object id="1" type="player-spawn" gid="1" x="16" y="208" width="16" height="16"/>
<object id="52" type="bomb" gid="51" x="240" y="192" width="16" height="16"/> <object id="52" type="bomb" gid="51" x="240" y="192" width="16" height="16"/>
<object id="63" type="brick" gid="23" x="304" y="144" width="16" height="16"/> <object id="63" type="brick" gid="23" x="304" y="144" width="16" height="16"/>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.8" tiledversion="1.8.6" name="tiles" tilewidth="16" tileheight="16" tilecount="1200" columns="20" objectalignment="topleft"> <tileset version="1.8" tiledversion="1.8.6" name="tiles" tilewidth="16" tileheight="16" tilecount="300" columns="20" objectalignment="topleft">
<image source="../../../assets/images/cirkoban.png" width="320" height="960"/> <image source="../../../assets/images/cirkoban-onesheet.png" width="320" height="240"/>
<tile id="2" type="wall"> <tile id="2" type="wall">
<properties> <properties>
<property name="kind" value="copper"/> <property name="kind" value="copper"/>