Preliminary Checks and Project Setup¶
Before you start writing a Player, check that the Brain can be used on your target engine, and prepare an empty project that does no more than build.
1. Check feasibility¶
The Brain is a C-API library written in Rust, and its per-frame output is a FlatBuffers buffer. Check the following three points for your target engine and language.
- Can Rust build for the platform? Check that your target CPU architecture and platform are listed in Rust's platform support. If the SDK release has no library for that platform, build it yourself (Integrating into no_std Environments §1).
- Can the engine's language call C functions (or WebAssembly)? Check that the engine can load a native library or WebAssembly, and that its language can bind and call the functions.
- Does FlatBuffers code generation support the language? Check the languages FlatBuffers supports.
2. Prepare the project¶
- Create an empty project that builds, in your target engine and language.
-
Obtain
flatc, and generate reading code for your language from the SDK schemas (libs/ssab/fbs/andlibs/ssruntime/fbs/). Add the generated code and the FlatBuffers runtime library to the project. -
Place the
libssruntimestatic library (.lib/.a) or dynamic library (.dll/.so/.dylib) in the project and link it. When you use it from C / C++, add the headerssruntime.hto the include path.
3. Prepare a test ssab¶
- Get
ssconverter-clifrom GitHub Releases (ssconverter-cli README). - In the SDK repository, run
ssconverter-cli tests/overall/overall.sspjto convert it to ssab. This project has an animation for each feature (“Implementation steps” in the contents). - Place the converted ssab (written to
tests/overall/overall/) in the project as an asset.