World generation - possible bug and solution

I’ve seen a couple of people here talking about and showing maps for different seeds that look very similar at the big scale but with different details. It could of course just be a coincidence, but it seems to happen a bit too often and with too many random values at the same time, so it might be a bug.
The reason that I’m writing this is because it reminds me of a bug I had in a school project a few years ago.

We were generating an “endless” city but noticed that the random height of the buildings (not much more than boxes) were just a few different values, instead of anything between min and max.
For each building we generated a LocalSeed based on the WorldSeed and the X and Y coordinates of the building and used it for the random parts of the building. The problem was that the first two or three values that we got for each LocalSeed were limited to just a few possible values. I assume that this is because the random number generator use the last couple of generated values when it generates the new one, causing it to more or less fail the first couple of times.
We used the standard random number generator for C++, rand().
Solved it by simply not using the first three values.

I’m thinking that if you generate local seeds for each random vector that the simplex noise is based on, then your random vectors might not be as varying as think.

2 Likes

Paging @8BitCrab or @Relyss: not sure this is really a “bug report,” seems more like a suggestion or development…

1 Like

hey there @Agon … interesting insight! and wow, it feels like I haven’t “seen” you in ages…

then again, this place has grown quite a bit over the past several months… which is, of course, a good thing! :smile: :+1:

3 Likes

Hi @SteveAdamo! Cool that you remember me. :smile:
(OMG Steve remembers me! :blush: )
I’ve stayed away for a long time because I spent too much time here and pesky irl-stuff demanded attention. Been lurking a little though and always follow the desktop tuesdays and twitch streams manically.
Finally installed the game at the end of the summer and came back here to report bugs and discuss features. It’s good to see that the community is still active and friendly. :smile:

Been thinking about writing an article, sharing some insights about the world generation and explain/suggest some simple methods to make the shape of the world more varying and dramatic. I’m not an expert, but I may be able to explain some things that I’ve seen people comment on. I guess time will tell if I find the time.

2 Likes