Spatial Partitioning

If you don't already know what spatial partitioning is, like many other techniques, it's a very literal term. Spatial partitioning, in the context that I've learned it, is the process of identifying areas of an in-game world to be rendered using a specific process, thereby increasing the performance of the task. In a 2-dimensional world, one of the most common ways of partitioning is via  a quadtree (See example below).

A quadtree begins with a grid of large nodes. If these nodes are empty, they shouldn't need to be rendered and can be left out, if there are objects inside of the node, the node will split into four smaller nodes, if there are objects inside of any of those nodes, the node with the objects in it will split again, so on and so forth down to a specified level. And so now, your computer can now focus on rendering the nodes with the objects within them, rather than updating al of the nodes at once. This saves the computer a lot of time, and is very commonly used.

In 3-dimensional space, the quadtree equivalent of this is an octree, which is the exact same concept as a quadtree on 3-dimensional sacle, so all nodes are cubes, etc.

Spatial partitioning is a good way to save performance in games, and I plan on using it if I can within my own project, given I have time do learn how to do it in the language I want to do it in.

 

Tylah Kapa