07-14-2012, 02:33 AM
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
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:
After the change. Note that the trees cover almost all ground. Ignore the lack of vines:
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:
After the change. Note that the trees cover almost all ground. Ignore the lack of vines: