|
Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
|
Creating plugins for Grindstone is an integral part of developing using the engine. All functionality and assets must be stored in a plugin.
Each plugin lives in its own folder and contains:
This structure allows:
Each plugin contains a plugin.meta.json manifest file, written in JSON. Here is an example from the Renderer plugin:
| Field name | Type | Description |
|---|---|---|
| name | string | A unique name for the plugin. It should be scoped, usually by Author.Type.PluginName. |
| displayName | string | A human-readable name that makes sense to be shown in logs and editors. |
| version | string | A semvar - which shows the version in the format Major.Minor.Patch |
| description | string | A description to be shown in the plugin settings page. |
| author | string | The name of the author (either a person, or perhaps a group.) |
| requiresRestart | boolean | Signifies whether a plugin can gracefully be enabled/disabled or requires a restart to work. |
| assetDirectories | Array of AssetDirectory | A list of all the directories which can provide assets for the game or editor to use. |
| dependencies | Array of string | A list of dependencies for the plugin to require. If these plugins are not in the list, they will be loaded anyway. |
| binaries | Array of Binary | A list of code binaries to load - these will contain functionality to be registered into the game/editor. |
| cmake | string | The relative path to a CMakeLists.txt file which is used to build C++ code. |
| Field name | Type | Description |
|---|---|---|
| path | string | The path to the actual compiled binary. Should be in lib if C++, scripts/bin if C#. |
| loadStage | string | The stage in the loading of the game when a plugin can be loaded or unloaded. These are provided by the engine and editor. |
| cmakeTarget | string | The name of the target in the Cmake file. Multiple targets can be provided in CmakeLists.txt |
| dotnetTarget | string | The path to a json file which defines how the C# project can be generated. Should be in the scripts folder. |
Paths can use the special token {Configuration} which expands to Debug, MinSizeRel, RelWithDebugInfo or Release. The meaning of these are not too important to plugin developers but should be included regardless.
| Field name | Type | Description |
|---|---|---|
| path | string | The path to the actual compiled binary. Should be in lib if C++, scripts/bin if C#. |
| loadStage | string | The stage in the loading of the game when a plugin can be loaded or unloaded. These are provided by the engine and editor. |
| mountPoint | string | This is a string that can be used as a root directory. It will be shown in the editor and can be used to refer to assets by path. |
As described above, asset directories and binaries can be loaded in the following broad stages:
A plugin can declare one or more C# files. These can contain the binary name, and a list of references to other binary names.