All projects

Deferred Jobs

Unity and Unreal prototypes of Allen Chou's delayed result gathering and time slicing patterns, applied to deferred visibility queries.

Engines
Unity, Unreal Engine 5
Languages
C#, C++
Pattern
Time slicing, delayed gathering

Unreal Engine 5

1 / 2

Two hands-on prototypes of the patterns from Allen Chou’s articles on Delayed Result Gathering and Time Slicing, one in Unity and one in Unreal.

Both use the same test case: an observer scans a grid with rays spread across frames. Results build an exposure map (red tiles are visible, green tiles are hidden), and a runner AI heads for the nearest hidden tile. The exposure map is only a test case: the point is to schedule work and gather its results frames later, so the main thread never blocks.

Features

  • Unity: time-sliced RaycastCommand batches, Burst-compiled setup and gather jobs, and a runtime ray-budget slider.
  • Unreal: a generic DeferredJobs module (ITimeSlicedJob and UDeferredWorkSystem) that kicks one slice per tick and gathers the previous one without blocking, with live per-slice debug lines.
  • Live exposure visualization in both engines.

Tech

  • Unity with C#, the Job System and Burst
  • Unreal Engine 5 with C++

What I learned

  • Separating scheduling from gathering, and what a frame of latency buys you.
  • How the same pattern maps onto Unity’s Job System and onto Unreal’s game thread.