Falcon Wiki - Module writing guide
Setting up a binary Falcon module is relatively simple. Here follows minimal setup instruction to get a module on the road while we write the user-level guide.
A pre-configured setup is in the Skeleton Module.
First, be sure to have latest Falcon installed, and to have development files also. You should be able to run falconeer.fal script directly from your prompt (it's installed with Falcon). Also, check for the availability of the development header files in the Falcon installation directory, or in /usr/include/falcon on POSIX systems.
You will also need CMake. Strictly speaking, CMake is not necessary to create a Falcon module, but the skeleton module uses a CMake script to create build files for different platforms.
- Download the most recent skeleton module from the download area.
- Use falconeer.fal to configure the skeleton module. You may set things as the module name, the author name and the license statement through falconer. Check the command line options by calling the script without any parameter.
- At that point, use CMake to generate the build scritps or project files for your compiler.
The skeleton module exposes a couple of functions that you can use as a starting point.
The Falcon API is available here: http://falconpl.org/docs/engine/current/. You will need to explore the Item class, the VMachine class and the Error class to write some basic module.
Falcon feather modules and other modules as DBI and SDL provide a quite complete set of examples of binary modules for several purposes.
Remember that you can check out our IRC Channel to ask for help in case you're stuck.
More to come...
Contents
Work in progress...
- Checking parameters - How to check parameters -- and report error in case of misuse.