Inspired by the Game Engine Architecture book and Naughty Dog's fiber-based job system slides on GDC, this project aims to serve as an implementation reference and a personal game engine building block.
class CustomTask
{
static void MyTaskFunc(CustomTask* pThisTask){...}
uint64_t m_taskId;
}
void main()
{
...
Gardener::JobSystem jobSys(runThreadNum);
CustomTask task;
jobSys.AddAJob(&task->MyTaskFunc, &task, tasks.m_taskId);
...
jobSys.WaitJobsComplete();
...
}
This project relies on Boost C++ and currently only works on WindowOS. Please install the boost library before using this repo.
There are three examples project under the example folder. In the project folder, you can use the following building command to generate the project:
cmake -B build -G "Visual Studio 16 2019" -DBOOST_ROOT=C:\boost_1_81_0
Please let me know if you need any help. Discord Server: https://discord.gg/ZmXaZUJzvF
- Game Engine Architecture, Third Edition
- Parallelizing the Naughty Dog engine using fibers
