Chickadee

Chickadee is a game development toolkit for Guile Scheme.

Chickadee logo

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)))
Hello world example screenshot

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)))
Sprite example screenshot

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))
Vector path example screenshot

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)))
3D example screenshot

Other features include:

chickadee sprite by Refuzzle, CC0

Documentation

View the reference manual

Releases

Requirements

Installation

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

License

GNU GPLv3+

Git Repository

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

Community

Real-time discussion for Chickadee can be found on the #chickadee channel on the Libera.chat IRC network

Contributing

Send patches and bug reports to davet@gnu.org.