aboutsummaryrefslogtreecommitdiff
path: root/doc/PLUGINS.md
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-06-14 11:10:58 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-06-14 11:10:58 +0200
commita084f521e94bba28c4c2f3ecee8e9912f87c20d7 (patch)
tree6585fe8656aed7dc10797fe7ad0264d4cce73af6 /doc/PLUGINS.md
parent3432efe82387a6a4145d087c4af1a354d4063901 (diff)
downloaddungeon_game-a084f521e94bba28c4c2f3ecee8e9912f87c20d7.tar.xz
Split documentation into multiple files and document gameplay
Diffstat (limited to 'doc/PLUGINS.md')
-rw-r--r--doc/PLUGINS.md11
1 files changed, 11 insertions, 0 deletions
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 "<plugin name>.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)