Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

The excavation system is a giant mess but at a high level it's really simple. There's a big 2d array of densities and then some functions loop over every single triangle, average out the densities to determine which ones are air, and then creates a mesh for it. When you excavate it loops over all the points and sets the nearby ones to zero density before running the entire mesh generation algorithm all over again, instancing new physics objects if there's no longer a triangle where there was one before. It's horrifically inefficient but just barely performant enough to work