Tuesday, December 20, 2016

And back to work

Drugs have been had-- it's a lesser dose than I need, but at least it's been enough that I can think straight again. Yeah! I've been overhauling my random generation methods, and I've got my Voronoi and relaxation methods working now.

For the non-programmers, let me tell you about random numbers. You'd think random numbers would be scattered evenly all over... but it's not how it really works. Random numbers are... well, random. They clump and group and piggy-back onto each other. Semi-random numbers are harder.

Observe:

Random numbers-- raw out of the random number generator.
So, I went in and started working on a Lloyd's Algorithm (this is the map generation stuff I'd mentioned earlier). It takes about two iterations to start looking nice.
After my new relaxation method-- much more evenly spaced.
I'll be using this on the tiles, for procedural item placement, ect. It's just one method, but it's an important one.

No comments:

Post a Comment