# How to search through large numbers of discrete objects that interact with each other, like Minecraft blocks?

Imagine you had a world like Minecraft, but wanted to bake in some sort of physics (okay, I was playing minetest actually).

For example, blocks under too much pressure might break, limiting how many blocks can be stacked on top of one another. I see one approach to this:

1. Systematically check each block. See if there is a block on top of that, a block on top of that, ect. Then, determine the pressure on the block that you just started with. Do this for each and every block.

I also imagine you could somehow check each block, then have it modify the properties of the blocks around it. If all force was from top to bottom, you could just start at the top. But if you want to have a "net force" (so unsupported blocks accelerate) I have no idea how this could be implemented. For instance, three blocks are floating in mid air.

How can I solve this class of problem?

• I can't get the "net force" part, for I couldn't really figure out a possible scenario. Did you mean, blocks constantly and inherently interacting with each other? Like, in fact, in a net? If so, seems like the matrix version (a square mesh) of a chain or a rope simulation (a sequence of edges). Is this it? Jun 11, 2020 at 17:42
• Jun 11, 2020 at 17:55
• Okay net force: If you are standing on a bridge, the force of gravity is pulling you down, but the force of the bridge is pushing you up, there is no net force, so you do not move - they cancel each other out. If, however, the bridge breaks undernath you, you have the force of gravity pushing you down and the force of air pushing you up. There is not much force in the air, so you DO have a net force: now you accelerate (fall down.) Jun 11, 2020 at 18:12
• It's unclear what is being asked specifically. How to calculate load bearing? Or how to find isolated regions of blocks? Or how to make blocks move together? Or how to make blocks move continuously, as opposed to staying within voxel cell? Or how to handle computation-heavy search in voxel grid, as stated in title? Jun 12, 2020 at 9:11