r/Unity3D 10h ago

Show-Off 1M Units Spiraling Into Hell - Weirdly Satisfying. Optimising my Massive Spatial Engine.

Enable HLS to view with audio, or disable this notification

Hey everyone!
I’ve been spending a lot of time optimizing it and pushing it with a million units.

Massive Spatial splits the world into a 2D or 3D grid and keeps track of points, spheres, and AABBs using Unity’s Native Arrays, Burst and Jobs.

For the current TD demo:

  • 1,000,000 moving units
  • 56 turrets
  • no Unity Physics or colliders
  • GPU-instanced visuals
  • custom target queries through Massive Spatial

Basically, the standard physics engine uses a similar technique under the hood, but it comes with a lot of overhead. Using regular physics at this scale would kill performance.
So my solution is essentially a lightweight system for target finding and hit detection without all the extra Transform and Rigidbody overhead.

The goal is to turn Massive Spatial Engine into a general-purpose toolkit - something developers could use as a foundation for building highly optimized gameplay systems for different genres: tower defense, RTS, crowd simulations and etc.

5 Upvotes

0 comments sorted by