Master Scheduler
Master Scheduler is a tool that allows you to spread workload over time.
Example usage :
- AI : Your agents' AI doesn't need to be processed every frame. With Master Scheduler, you can guarantee that only a fixed number of your agents are doing work at any given moment and thus easily and efficiently spread the AI workload over time.
- Explosions : Afraid that exploding a car in that parking lot will create an out of control chain reaction of OverlapSpheres ? Master Scheduler can easily spread the explosion events over the few following frames and eliminate frame time spikes.
- Spawning : you can queue thousands of spawning events and let the system handle the rest.
- Weapons : Your shotgun shoots multiple pellets ? That means multiple raycasts, impact visual and sound effects, GetComponent() calls and health updates in the same frame. With Master Scheduler you can spread the shooting event over a few imperceptible milliseconds and avoid the fps drop.
Master Scheduler doesn't create or manage threads. It creates job queues and executes them in the most efficient way over multiple frames.
You can either constrain the job queue to a maximum number of jobs per frame or to finish all jobs in a set number of frames.
Every project out there should have a job scheduling tool.
Improve the efficiency of your code today !
***
Two examples are provided :
- Pathfinding with 10.000 agents.
- Chain explosion.
A manual that explains the usage of the tool is also included.