An idea for real-time procedural generation. (Spawn only ground prefabs, that will spawn around other stuff on destroy)

Idea:
For concept simplicity, “some sandbox survival”:

  1. Instantiate a plane made of bunch of cubes through perlin noise
  2. When you destroy the cube, it instantiates cubes around it, with random, depending on depth levels, like gravel, sand, the cave one put more empty spaces around.
  3. Etc.
  4. Profit (lol)

What you think? Or it is dumb way?
I know that performance will be bad, if i make an explosion that makes a lot of cubes to instantiate.
And the default OnDestroy() probably won’t be used, due to potential issues.

The point of post currently, will it be impossible, or not? Considering the junior, maybe poor middle level in C# and only GPT as an assistant in case.
(The cubes are probably just an example, won’t be used)

Give it a whirl… something like that should take less time to implement than to talk about, and implementing it is what counts.

There’s also like ten billion tutorials on making minecraft out there, and what you describe just sounds like a poor man’s minecraft tbh.

1 Like

nah, those tutorials aren’t the fun way to do it and there are also some things that i don’t like in them.

Everything in my first sentence stands. Let us know what you find out.

Spawning a bunch of cubes won’t work. This is voxel territory. There’s ample information out there on the subject and nothing we can write here that hasn’t been written about already ad nauseum.

1 Like

that is why i written “for simplicity of the concept”. It would take eternity to write a pseudo code of what i want to happen exactly in final variant for a post. I already spent 2 hours+ on one of my whiney posts about other topic.

Maybe it wont be even minecraft like, more like real terrain.

Basically I guess it will be some prefab spawning system that does it without seams and in realtime if its not the killer, at least only the surface part will be pregenerated, that can be applied to a sandbox game for the main map.

The point of post currently, will it be impossible, or not? Considering the junior, maybe poor middle level in C# and only GPT as an assistant in case.

Anything is possible if you’re willing to learn. Go experiment, go learn. Make some forum posts if you have issues.

1 Like