Well, to generate the terrain for my android game I did a bit more research.
Fractal terrain looks nice, but you have to generate it somehow. One way of doing this is to generate a noise map and tile a smaller version of it onto itself. But if I want my terrain to scroll up and down infinitely and loop itself (and I do! Otherwise the work I did on the tile manager would be a bit useless!), so you can scroll the map up or down, to the left or right, and end up where you started, AND look natural (without any breaks/seams), you need to have a seamlessly tiling noisemap!
Turns out, there is a technique which allows this: 4D simplex noise. Simplex noise is a rethink of the famous Perlin noise, created by Mr Perlin himself to fix the problems and limitations Perlin found in his own Perlin noise. To make this Simplex noise tillable in the x and y directions, you use an incredibly clever technique where you take your noise from a looping circle over these four dimensions.
There’s a paper by Perlin himself and an even better explanatory paper by a mr Gustavson which helped me a lot. But the most helpful so far has been a guy/girl who goes by the handle of JTippetts, whose many posts on the internet have been a revelation.
To be really honest, I kind of understand what’s going on and how it is done. But not yet enough to explain it 🙂 As Albert Einstein said, you only really understand something when you can explain it to your grandmother 🙂
And, just to prove I only partially understand the technique, here’s the proof. I can use the technique to generate terrain … I just can’t get it to tile yet!