summaryrefslogtreecommitdiff
path: root/examples/simple.scm
blob: d00a7d072029623027ef84ea548e2055351d5a5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(use-modules (2d game)
             (2d sprite)
             (2d vector2)
             (2d window))

(load "common.scm")

(define sprite (load-sprite "images/p1_front.png"
                            #:position (vector2 320 240)))

(add-hook! draw-hook (lambda (dt alpha) (draw-sprite sprite)))

(with-window (make-window #:title "Simple Sprite Demo")
  (run-game-loop))