How to build the demo Raylib game (you will need vcpkg and CMake):
- Get the required dependencies with VCPKG, as below:
vcpkg install raylib
cmake -B build-msvc -S . -G "Visual Studio 17 2022"
cmake --build build-msvc
cmake -B build-msvc -S . -G "Visual Studio 17 2022"
cmake --build build-msvc --config Release
The resultant folder "build-msvc" will contain the build and the .sln project for Visual Studio.
There is a performance test to see where are the hotspots of the ECS library. This test displays the time to both spawn entities and to run systems with them. The test can also be used with VTune Profiler to check more detailed information about the library in runtime.
To run the tests, do the following:
- Build with RelWithDebInfo
cmake --build build-msvc --config RelWithDebInfo
-
The test will be generated in
build-msvc\perf_test\RelWithDebInfo
and can be run withperf_test.exe <#entities/3> <#iterations>
-
Example results from VTune, showing how the use of maps to manage entities and components together with a lack of parallelism impairs the performance:
Time to perform 300000 spawns: 10ms
Time to run 100 systems with 100000 entities: 310ms