Went to bed last night with the problem of rivers in the back of my mind. Woke at around 0330 with the 'solution'. Totally wasn't going to get out of bed to do some coding to get it to work, as I had to work in the morning. But after work and some couch time I've got it to work in less code than version 1. The blue blobs are the 'rivers'. More like lakes than rivers, but at least they are now the y and x arms are no longer right angles to each other, or simply a diagonal blue line across the map.
I think there may be a bias in there toward the low end of the random scale, as they appear to be mostly on the left hand of the map.
Other potential improvements would be to follow the gradient in the map rather than a random walk type generation. It would be nice to keep iterating a river till it hits the edge of the map, rather than stopping before then.
But they are plans for another day.
No comments:
Post a Comment