From a084f521e94bba28c4c2f3ecee8e9912f87c20d7 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 14 Jun 2021 11:10:58 +0200 Subject: Split documentation into multiple files and document gameplay --- doc/PLUGINS.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/PLUGINS.md (limited to 'doc/PLUGINS.md') diff --git a/doc/PLUGINS.md b/doc/PLUGINS.md new file mode 100644 index 0000000..d0e0070 --- /dev/null +++ b/doc/PLUGINS.md @@ -0,0 +1,11 @@ +# Plugins + +You can easily create plugins for the game by putting a new folder into plugins/ with the name of your plugin and then compiling your code into a shared library placed inside this folder named ".so" (`-shared -fpic`). +You might want to include the game.h file from plugins/game/game.h. Have a look into it to see available API. See the existing plugins for examples. + +## Dependencies + +If you want to make a plugin that needs to use ABI from another plugin (including the game itself), make sure to depend on that plugin. To add dependencies to a plugin, create a file named dependencies.txt in the plugin folder. Put the names of all plugins your plugin depends on into that file. You can use spaces or newlines as seperators. + +## Makefile inclusion +All Makefiles that are placed in plugin directories are included by the main Makefile, so you might want to include a makefile in your plugin. The plugins target simply depends on ${PLUGINS}, so just add things to this in your plugin Makefile to add them to the plugins target (usually your plugin.so) -- cgit v1.2.3