I want to comment on the climate thing: like you said in that gDoc, doing the calculations of the temperature & humidity maps from the final map might just be an overkill. I also think that after Java receives the raw heightmap from PlaTec, all other maps should be calculated from it and then (the heat and moisture maps are) just (linearly) interpolated - no one will notice the difference apart from decreased execution time.
Also, i got an idea for "fast" way to calculate the global heatmap:
On a flat map this would result a hot belt on equator and cold at the "poles". A mountain will block the progress of heat towards the "poles" just like it does now. Finishing touch would be to run an aggressive gaussian blur on the heatmap.
With one simple optimization this method would require just width*height operations per coordinate to get the raw heatmap and after that the blur would require something like blur_width*blur_height*width*height operations to finish it off. For a 512*512 map and 4*4 blur this would mean 512*512+4*4*512*512=4456448 operations i.e. roughly 2 milliseconds (of which 94% comes from the blur). However, i haven't tested the idea in practice so i can't guarantee good results.
Edit: Even better, take the average of the heatmap generated above (withOUT blur) and a heatmap where
The combination would result in a heatmap where elevated areas are colder even at the equator in less than 0.5 milliseconds. Then, just move the sun away from the equator 0+30*cos(day/365) degrees and recalculate the heat distribution on the fly for every single day!
Also, i got an idea for "fast" way to calculate the global heatmap:
Code:
for (int y = 0; y < map.height; ++y)
for (int x = 0; x < map.width; ++x) {
double height_sum = map[y * map.height + x];
int di = y < map.height / 2 ? -1 : 1;
for (int i = map.height / 2; i != y; i += di)
height_sum += map[i * map.height + x];
heatmap[y * map.height + x] = 1.0 / height_sum;
}
With one simple optimization this method would require just width*height operations per coordinate to get the raw heatmap and after that the blur would require something like blur_width*blur_height*width*height operations to finish it off. For a 512*512 map and 4*4 blur this would mean 512*512+4*4*512*512=4456448 operations i.e. roughly 2 milliseconds (of which 94% comes from the blur). However, i haven't tested the idea in practice so i can't guarantee good results.
Edit: Even better, take the average of the heatmap generated above (withOUT blur) and a heatmap where
Code:
for every point on heightmap
heatmap[x, y] = 1.0 / heightmap[x, y]