Previous: Invoking SLAYER, Up: Introduction


1.3 Trying out the demos

In addition to the core SLAYER and some libraries, SLAYER comes with a set of demos that show how easily complex things can be achieved. They are located in the “demos” subdirectory. Note however, that the demos are available only if you obtained SLAYER source from the repository, and are not contained in the release tarball.

If you manage to build SLAYER (even without installing it), you can run the demos with the following commands (assuming you're in the “demos” dir):

$ ./slayer # equivalent to ./slayer slayer.scm

$ ./slayer -e3d

$ ./slayer pong.scm

If you have Open Dynamics Engine installed on your system, you can also try building the (scum physics) module by entering “src/scum” dir and typing

$ make

If you manage to build it successfully, then, back in the “demos” dir, you can try it out by typing:

$ ./posed.scm

Note however, that the (scum physics) module isn't bundled with the tarball and needs to be obtained from the mercurial repository:

$ hg clone http://hg.gnu.org.ua/hgweb/slayer

More importantly than just playing with the demos (which, honestly, can become boring quite quickly), you are encouraged to read their source code (which, in turn, is a fascinating and endless endeavour). In particular, the “guile-modules/widgets/3d.scm” module defines a file format for representing 3d mesh (an example can be found in the “demos/art/3d/cube.3d” file), and the scum/physics.scm defines a “define-rigs-for” procedure, which is used to implement a file format for representing rigs (see “demos/art/rigs/car.rig” to see a more advanced example, or “demos/arg/rigs/ground.rig” for hopelessly simple one)