Introduction
Starting from gbrainy 1.02, you can extend gbrainy easily with new games that you develop as extensions. These are external assembly files that gbrainy recognizes at runtime. The extensibility capabilities are provided by Mono.Addins framework. You do not need to recompile gbrainy.
gbrainy supports three types of extensions Logic, Memory and Calculation that correspond to the types of games that gbrainy supports.
Anatomy of an extension
An extension should be a self-contained game. It should provide at least two files:
- The source code of the extension
- A manifest file that describes the extension
It also may contain graphics or additional resources required by the game.
At gbrainy source code repository there is a directory called sample_extensions that contain three types of games supported.
Building extensions
You do not need gbrainy source code to build extensions, you only need to have gbrainy properly installed. For a simple extension containing a single code file and a manifest, you should be able to compile it like this:
gmcs -t:library CalculationSample.cs -resource:CalculationSample.addin.xml -r:gbrainy.Core.dll -r:Mono.Cairo -r:Mono.Posix
Installing an extension
The assembly containing your extension (and the manifest file if not bundled as resource in the assembly) have to be copied either in $PREFIX/lib/gbrainy/extensions (e.g. /usr/lib/gbrainy/extensions) to make it available system-wide, or in ~/.gnome2/gbrainy/addins if you don't have enough rights to install it system-wide.
Support
There is a gbrainy public group where people can share its experiences, ideas and get involved in gbrainy development.
Also you can check Mono.Addins documentation.
