Chickadee is a game development toolkit for Guile Scheme.
Chickadee provides all the essential tools that parenthetically inclined game developers need to make games in Scheme.
Here is the obligatory “Hello, world” program:
(define (draw alpha)
(draw-text "Hello, world!" (vec2 260.0 240.0)))
And here's how to draw a sprite:
(use-modules (chickadee graphics sprite))
(define sprite (load-image "chickadee.png"))
(define (draw alpha)
(draw-sprite sprite (vec2 256.0 176.0)))
Chickadee can render vector paths:
(use-modules (chickadee graphics path))
(define gradient
(radial-gradient #:start-color tango-light-sky-blue
#:end-color tango-dark-sky-blue
#:radius 240.0
#:origin (vec2 240.0 240.0)))
(define painter
(let ((filled-circle (with-style ((fill-color gradient))
(fill (circle (vec2 240.0 240.0) 240.0)))))
(translate (vec2 80.0 0.0) (corner-split filled-circle 4))))
(define canvas (make-canvas painter))
(define (draw alpha)
(draw-canvas canvas))
And it can also render 3D models:
(use-modules (chickadee graphics light)
(chickadee graphics model)
(chickadee graphics skybox))
(define model (load-gltf "Suzanne.gltf"))
(define camera-position (vec3 0.0 0.0 3.0))
(define world (make-identity-matrix4))
(define view (look-at camera-position (vec3 0.0 0.0 0.0) (vec3 0.0 1.0 0.0)))
(define projection (perspective-projection (/ pi 3.0) (/ 4.0 3.0) 0.1 5.0))
(define skybox
(make-skybox
(load-cube-map #:right "right.jpg"
#:left "left.jpg"
#:top "top.jpg"
#:bottom "bottom.jpg"
#:front "front.jpg"
#:back "back.jpg")))
(define (draw alpha)
(with-projection projection
(draw-skybox skybox view)
(draw-model model
#:model-matrix world
#:view-matrix view
#:camera-position camera-position
#:skybox skybox)))
Other features include:
chickadee sprite by Refuzzle, CC0
To install Chickadee with the GNU Guix package manager, run:
guix install guile-chickadee
To build and install Chickadee from source, run:
wget https://files.dthompson.us/releases/chickadee/chickadee-0.10.0.tar.gz tar xf chickadee-0.10.0.tar.gz cd chickadee-0.10.0 ./configure make make install
GNU GPLv3+
Chickadee is developed using the Git version control system. The official repository is hosted at https://git.dthompson.us/chickadee.git.
To clone the repository, run:
git clone https://git.dthompson.us/chickadee.git
Real-time discussion for Chickadee can be found on the #chickadee
channel on the Libera.chat IRC network
Send patches and bug reports to davet@gnu.org.