(Well, designing fractal world gen for n cores wasn't that hard actually. Next thing would be coding. :) )
Really? What scale, what features did you implement, and how did you do it?
(I haven't implemented it yet just designed.)
Uhm... Lets see if I can explain it...
I assume you know how diamond-square works.
Basically when you have one fractal gen you don't need more, because you can use it to do just about all stuff you need. For example you can use it to make landscape and use them in 3D(Thats pretty basic use for diamond-square). Next you can use same generator to make more 'landscapes' and use them for example to show vegetation or amount the trees etc. What I am planning to do first is two generated 'landscapes' one is for landscape and another for trees.
Ok, then the algorithm.
1. One thread makes random numbers from the given seed(These are stored into areas that can be calculated separately. See below.).
2. When theres enough random numbers for current diamond-square 'zoom' phase(First phase is 2x2, second 4x4 and so on.) n threads do the rest of the calculations. The calculations are done the way that theres no need for locks & stuff. How? Uhm... For each area theres only need to calculate middle point, upper point and point that is on the right(trivial). How to make it thread-safe? Lets use 2x2 to show how does it go.
First of all you can't use same numbers from same area that is one zoom level above area you are calculating(Too confusing? Read on, I hope it will make sense in one point.).
One zoom level above 2x2 looks like this
0
So no calculations can be done parallel. They have to be done like this in 2x2(1=calculating values).
10->01->00->00
00->00->10->01
Next will be 4x4(Lets split the areas that can be calculated separately.).
2x2 looks like this and its one zoom level above 4x4
0|0
----
0|0
So 4x4 can be done like this
10|10->01|01->etc.
00|00->00|00->
-------->-------->
10|10->01|01->
00|00->00|00->
Next 8x8...
etc.
It might not be the best way to do it, but I wasn't looking for optimal way to do it yet. :)