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:
- 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?