summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-07-01 23:01:49 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-07-27 17:15:43 +0200
commit7d11e47f2c324ad49ab893dc74eb5e9680f7ae30 (patch)
treed9f0d9d8cb9ead87bf904ac59688c22a30049e02
parentb057acbc3b06d1e815bb1b9d43241ac35b058d1e (diff)
Add lorenzo asset.
-rw-r--r--assets/images/README6
-rw-r--r--assets/images/lorenzo.pngbin0 -> 41760 bytes
-rw-r--r--assets/images/src/lorenzo.xcfbin0 -> 81394 bytes
-rw-r--r--scenes/game.scm24
4 files changed, 18 insertions, 12 deletions
diff --git a/assets/images/README b/assets/images/README
new file mode 100644
index 0000000..ab6f672
--- /dev/null
+++ b/assets/images/README
@@ -0,0 +1,6 @@
+* lorenzo.png + src/lorenzo.xcf
+Author: Ricardo Wurmus
+License: CC-BY-SA 3.0
+
+Based on "https://opengameart.org/content/small-34-rpg-character-base"
+under CC-BY 3.0 / CC-BY-SA 3.0 / OGA-BY 3.0
diff --git a/assets/images/lorenzo.png b/assets/images/lorenzo.png
new file mode 100644
index 0000000..25c97b7
--- /dev/null
+++ b/assets/images/lorenzo.png
Binary files differ
diff --git a/assets/images/src/lorenzo.xcf b/assets/images/src/lorenzo.xcf
new file mode 100644
index 0000000..174ef62
--- /dev/null
+++ b/assets/images/src/lorenzo.xcf
Binary files differ
diff --git a/scenes/game.scm b/scenes/game.scm
index c7aaba7..30d2d5c 100644
--- a/scenes/game.scm
+++ b/scenes/game.scm
@@ -47,9 +47,9 @@
(define-class <character> (<node-2d>)
(velocity #:getter velocity #:init-form (vec2 0.0 0.0))
- (walk-speed #:accessor walk-speed #:init-form 1.0)
+ (walk-speed #:accessor walk-speed #:init-form 1.2)
(direction #:accessor direction #:init-form '(idle))
- (hitbox #:getter hitbox #:init-form (make-rect 0.0 0.0 32.0 32.0)))
+ (hitbox #:getter hitbox #:init-form (make-rect 8.0 0.0 16.0 16.0)))
(define-class <stats> (<node-2d>)
(player #:accessor player #:init-form #f #:init-keyword #:player))
@@ -93,23 +93,23 @@
(split-texture (load-image file-name) tile-width tile-height))
(define-asset player-atlas
- (load-atlas "assets/images/thing.png" 32 32))
+ (load-atlas "assets/images/lorenzo.png" 32 32))
(define-method (populate (player <player>))
(list
(make <animated-sprite>
#:name 'sprite
#:atlas player-atlas
- #:animations '((idle-right . #(0 1))
- (idle-left . #(2 3))
- (idle-front . #(0 1)) ; TODO
- (idle-back . #(0 1)) ; TODO
- (right . #(0 1))
- (left . #(2 3))
- (up . #(0 1)) ; TODO
- (down . #(2 3))) ; TODO
+ #:animations '((idle-right . #(8 8 8 8 8 7 7 7 7 7))
+ (idle-left . #(0 0 0 0 0 15 15 15 15 15))
+ (idle-front . #(24 24 24 24 24 32 32 32 32 32))
+ (idle-back . #(16))
+ (left . #(1 35 2 35))
+ (right . #(9 34 10 34))
+ (up . #(17 16 18 16))
+ (down . #(25 24 26 24)))
#:current-animation 'idle-front
- #:frame-duration 15)))
+ #:frame-duration 10)))
(define-asset test-map (load-tile-map "assets/maps/01.tmx"))