Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Common Lisp CFFI bindings for the Chipmunk Physics library.
Common Lisp Shell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
scripts
README.md
accessors.lisp
bindings.lisp
chipmunk.lisp
clipmunk.asd
exports.lisp
extra-bindings.lisp
wrapper.lisp

README.md

CLIPMUNK

CLIPMUNK provides Common Lisp CFFI bindings for the Chipmunk Physics library. It began as a fork of Ralith's cl-chipmunk library, but after a while I got tired of writing the defcfuns by hand and switched to using SWIG to generate the bindings automatically.

Installation

TBA

Limitations

Some of the functions in the Chipmunk API depend on getting struct arguments passed by value, but this is not possible with CFFI. There is a workaround for this, however: we can pass each element in the struct as a separate argument to the function, as long as they are passed in the correct order. Since the most frequently used struct (cpVect) is a fairly simple one, consisting of just two double floats, it is quite easy to adjust the generated bindings to accomodate this.

This approach seems to work nicely, at least on x86-based platforms.

Testing

CLIPMUNK is being developed and tested on SBCL running on Linux and OSX.

Something went wrong with that request. Please try again.