Some semi-random thoughts on terrain generation
Ah, found the culprit for air-based trees. They were generated for an offset pair of coords (GetTreeImageByBiome added 3 and 5 to coords before passing them to GetJungleTreeImage)
Reply
Thanks given by:
so the jungle trees are fine nowBig Grin
Reply
Thanks given by:
Not yet. Either they're slow, or they overwrite logs with leaves. Need to fix that. But I'm going to bed now 'cause I haven't slept much last night and I look like a zombie nowTongue
Reply
Thanks given by:
sleep well Smile
Reply
Thanks given by:
Wow. Just... wow! I found out that our random number generator is not so random after all, and it's not wise to divide or module the number it generates by powers of two directly. It's much better to first divide by a small prime and then divide or module by the power. Generates much better coverage Smile

What this means for terrain generation: trees are finally being placed randomly. Before, they were trying to form clumps at specific coords and thus weren't generated due to overlap.

An image is worth 1000 words, so here's the difference in two images:

Before the change. Note the rather large gaps where there are no trees:
[Image: jungle_before.png]

After the change. Note that the trees cover almost all ground. Ignore the lack of vines:
[Image: jungle_after.png]
Reply
Thanks given by:
wow that is a big difference :S when did you figure it out??Tongue
Reply
Thanks given by:
I ran across a similar issue while writing ravines, now that I've been working with trees again, I tried the alternate approach and was amazed as to how much that tiny change helped.
Reply
Thanks given by:
Jungle trees committed. Now all they need is branches. And maybe better shaped leaves around the top, these look much better:
http://www.minecraftwiki.net/wiki/File:JebJungle.jpg

Also, I got rid of the vines on trunk because they were't written good enough. If someone is brave enough to try, be my guest.
Reply
Thanks given by:
I did some experimental dissection of vanilla minecraft to see how it generates caves. I think the results are worth sharing, so here's a video:

Basically, I made MC-server read an Anvil world created by vanilla MC, and upon reading it, "invert" the ground - everything solid was replaced by air and original air was replaced by stone. This produces solid "worms" where the caves were.
Btw. this is exactly what Rev 690 does, when enabled Smile
Reply
Thanks given by:
Cool :o
Reply
Thanks given by:




Users browsing this thread: 44 Guest(s)