SDK and build
The SDK
Section titled “The SDK”Brasa comes with an SDK: the headers (brasa/*.hpp) and the engine’s libraries, already compiled. Your game is compiled against this SDK, so you don’t recompile the engine, only your code.
What Play does
Section titled “What Play does”- Saves the project.
- Generates a
CMakeLists.txtand amain.cppin the project’s.brasa/folder, with all your.cppfiles. - Configures the build with CMake, the first time or when something changed. It’s the configurar step in the progress box.
- Compiles with the C++ compiler from the Visual Studio Build Tools (MSVC). The executable ends up in
.brasa/build/RelWithDebInfo/game.exe. - Opens the game pointing at the project’s folder: the rooms, sprites and sounds are read straight from there.
From the second compilation on, it only recompiles the files that changed.
The .brasa/ folder
Section titled “The .brasa/ folder”Everything inside .brasa/ is generated. It can be deleted without losing anything: the next Play recreates it. The .gitignore that Brasa creates already leaves this folder out of Git.
After updating Brasa, Play notices that the engine changed and redoes the build from scratch by itself, with the new headers and libraries. If something still goes wrong, delete the .brasa/ folder and press Play again.
Autocomplete (.vscode/)
Section titled “Autocomplete (.vscode/)”Play, creating the project and brasa_cli generate:
.vscode/c_cpp_properties.json, with a configuration called Brasa that points to the SDK’s headers, in C++20;.vscode/extensions.json, which recommends Microsoft’s C/C++ extension.
If you already had a c_cpp_properties.json, only the Brasa configuration is updated; the rest stays as it was.
Required tools
Section titled “Required tools”- C++ compiler (MSVC) and CMake, which come in the Visual Studio Build Tools. The Brasa installer checks and offers to install them.
- The editor’s status bar shows SDK ok and CMake ok when everything is fine. The CMake path can be set in Projeto › Preferências… (Project › Preferences).
Problems? See Common problems.
