Extending the engine: choosing an API
When to use C#, an editor plugin, a native library or an engine module.
Choose an extension mechanism by the task and available API. Having C++ source does not mean every feature requires a custom engine build.
| Task | Starting point | Requirements |
|---|---|---|
| Game logic, custom components and data | C# Entity/Resource | Build the C# project with the available managed SDK |
| Custom data format | ResourceFormatLoader/ResourceFormatSaver | Format callbacks and handler registration |
| Synthesis or queued PCM | AudioStreamGenerator | Consistent rates, buffer filling and underrun monitoring |
| Editor tool | EditorPlugin, or EditorImportPlugin when needed | Editor lifecycle and registration cleanup |
| Native library through the available ABI | ReckfellExtension | Per-OS/architecture libraries and suitable interfaces |
| Internal systems unavailable through an API | C++ module or Source change | Engine and required export-template builds |
| New platform backend | Platform port | Window, input, rendering, audio and target-build integration |
Start with an observable result
- Find the required type and method in the SDK reference. An internal C++ method is not automatically available in C# or the extension ABI.
- Implement one complete scenario: create an object, call the function, obtain a result and release owned resources.
- Assign ownership of registrations and subscriptions. Remove them when disabling a plugin or shutting down its service; disposing a wrapper does not replace unregistration.
- If the code must run for players, test an exported game. A successful editor run does not establish that a native library, dependencies or custom files are present in an export.
Working examples: custom resource formats, streaming audio. For editor tools, start with EditorPlugin and EditorImportPlugin.
When native builds are needed
ReckfellExtension loads a separate native library described by .reckfellextension. Library selection depends on target platform and architecture features; a single library file does not automatically run on every system. Access is limited to the extension interface: using C++ does not expose arbitrary private Source classes and functions.
A C++ module is part of the engine build. Its registration is divided into Core, Servers, Scene and Editor initialization levels. Editor-level code must not be assumed to exist in the game. Changing a module requires rebuilding the relevant executables; distributing a game needs matching templates for its target platforms.
Neither an extension nor a module guarantees a speed improvement. First measure the scenario: computation, API crossings, data copies, waiting or GPU work. Moving small calls across a language boundary may leave the real bottleneck intact.
Continue with native extensions, C++ modules, platform ports.