Quote Originally Posted by Darkhog View Post
Not infinite, in chunks. The trick is to have x/y offset variables and to waste first x/y random numbers and create actual bitmap.

I.e. if you want to generate chunk you set x offset (for simplifying, let's assume that chunks are going in straight line) to chunksize*number of chunks already generated. Then, based of value of xoffset you "waste" first several columns. In pseudocode (for simplicity chunks are white noise):
I certainly wouldn't use your approach. Why? As you say "wasting" random numbers would be wasting CPU time. Are you aware that random number generation is one of the bottlenecks of the Perlin Noise algorithm? And other is mothening the textures.

If you don't belive me just go and create several thousands of random numbers and see how much time would your computer need to do that. And if you think that 100x100 ofset would mean you would be wasting 10000 random generated numbers. NOT a good idea.

For solving this problem it would be wiser to use one of custom Random Number generation algorithms which alow takind additional imputs which are then used during random number generation. Problem with most of such algorithm is that when theese inputs numbers becomes large the random number generation becomes more eratic.



Quote Originally Posted by Darkhog View Post
And yes, if you can I'd appreciate if you could make it work. All I need is simple Perlin noise.
OK then I'll get to work as soon as I find some time. Anwhay I still have a gime in mind which will use this.


Quote Originally Posted by Darkhog View Post
Simple
Code:
 if value>255 then value:=255;
at the end of combining code, but before putting it into byte array should help with that.
And the result would be flatheaded mountains. So unrealistic.
At the time I was thinking of finding highest point and then normilize whole texture so that this highest point doesn't exceed the limit.
Oh now I remembered that I was also planning to do a complete rewite of my algorithm.
Storing values in 2D array would be a problem for my postprocessing functions as I will require data to be soreted by height for instance. This means storing them in a list as nodes (Height, X and Y position). This will result in need for more memory.
Gues I should start searching for suitable Random number generator algorithm which supports accepting aditional parameters (X,Y position). This way I would be able to generate my map in chunks.

But first let my try to get that glscene algorithm working so that you will at lest have some basic random map generation available to work further on your game.