8 Comments

  1. The goal was to make a structure generator that can make structures of near infinite (or at least massive) complexity with little to no lag

    this basically works by generating one chunk at a time rather than the entire structure, in order to keep it coherent it basically takes the size of the structure (lets say 128×128) and generates data for it. for example lets say you want to make a city, on the large scale you will want to designate zones rather than blocks or structures, then when you finish the high level data you subdivide the square into 4 squares, each of 64×64 each, then only focus on the one that contains the chunk. next we generate data for this square, if we know that this square contains the zones “farming” and “housing”, then we just need to decide what kind of farms and houses, for example what to grow or what types of housing (slums or wealthy), once you decide the data you simply subdivide again, now we have 32×32 squares, we keep doing this until we reach the smallest division which is 16×16, aka one chunk. these lower levels are where we decide the fine details like structures or whatever, it doesn’t matter which division level you do whatever on though, its all up to the coder. these structures can start at any level, for example to cover the ENTIRE WORLD in one detailed structure only requires around 22 subdivisions (think of folding a paper in half a bunch), which is certainly faster than the quadrillions of structure placements the vanilla system would take.

    The best part is that once a region is subdivided, we can simply save it for later, that means you only need to do the calculations one time

    While i made this to make infinite structures it was only after i made it that i realized the potential, this system can do complex large scale simulations for structures. like fortifying defenses in biomes that need it, or testing the structural integrity of a structure to create ruins. Or even simulate stuff for things other than structures, like biome placement. I tried to make the system as scalable as possible even if it requires a lot of boilerplate code

    Also im not a good builder so i cant really do much with this system on my own

    Join the Discord, hang out, maybe build or smth idk: [https://discord.gg/ZME74MC2mt](https://discord.gg/ZME74MC2mt)