To build scythe, the following dependencies are required:
- C++23
- Python 3.12+
- DotNet runtime 6
- DotNet SDK 8
You can install the dependencies by running the install_requirements.bat file. Note that if you already have visual studio installed you may still have to manually install the required packages (the C++ desktop packages)
First up, you'll need to run setup.bat to install the dependencies. Once that is done, either work with samples/sandbox or create your own project by using Engine/Build/project_gen.py.
Once you have a project, you can generate the build files using build_tool.bat. Then, open the project with your chosen IDE.
The project is currently only tested on Windows using MSVC and MsBuild. Currently using anything else than MSVC and msbuild is not supported because of C++23 modules.
The following architecture is proposed for the project hierarchy:
ScytheEngine
│
└───Engine
| └───Build -> Contains the build tools script files, the generator tool files and any necessary third party for the build process
| └───Intermediate -> Contains the intermediate files generated by the build process
| └───Binaries -> Contains the final build files
│ └───Resources -> Non code resources (shaders, textures, etc)
| |
│ └───Source
│ │ └───Common -> Common tools and structs. Language layer of the engine
│ │ └───Core -> This is the main executable code of the engine.
│ │ └───Systems -> Engine general systems (Renderer, Physics, etc)
│ │ └───Components -> General components for the engine (Transform, Camera, etc)
| | └───Physics -> Physics engine code
| | └───Graphics -> Graphics engine code
| | └───ImGui -> ImGui module with helpers
│ │ └───Reflection -> Reflection system code and generated files
│ │ └───ThirdParty -> Third party libraries and bindings
│ │ └───Tools -> Generic tooling (profiling, I/O, etc)
│ │ └───Editor -> Editor code
└───Samples
│ └───Sandbox -> Sandbox project where we develop and test the engine
Scythe works with Game projects. There is a project_gen.py script to help you create a game project and link it to the engine folder. You may have to update it, project_gen.py should have an option to refresh the link files but it may not work. Game projects work the same way as the engine with a build_tool.bat file. Whenever you need your files refreshed in the solution, run it. The game sln will always contain the scythe project as a dependency.
Game projects will contain three configurations (debug, development and release) and two targets (Game and Editor). Running in editor build will run in editor mode and game will run without the editor. Release cannot be run with the editor.
The engine uses code generation to generate some c++ boilerplate. Sadly MSBuild does not handle global generation as a prebuild step easily and will therefore not take notice of the new files during the first compilation. If you get compilation errors about generated files the first time you compile, try compiling again.
Rider/Visual Studio won't necessarily update their vcxproj to compile ixx automatically (modules are not well supported). Use build_tool.bat (the one in your game project) to refresh the files.
You probably ran the engine build tool. Make sure you run the script in your game project.
Compiling constantly has weird errors with the generated code or there are generated files in double for every reflected files.
Sometimes the database used by the code generator gets corrupted. Delete the database file in Engine/Build/ThirdParty/Reflector/bin/db and clear the generated folder. The reflection should rescan the whole project afterwards.