Results 1 to 10 of 20

Thread: Procedural world generation - ground and traps seems to not generating.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    [QUOTE=Carver413;95470]
    Quote Originally Posted by SilverWarior View Post

    you only need to set the seed once. changing the seed will change everything and you will never get the chunks to match;
    Code:
    for y:=0 to height-1 do begin
      for x:=0 to width-1 do begin
        vNoise:=PerlinNoise2d(x+vOffsetX,y+vOffsetY,Persistence,Frequency,Octaves);// Noise is -1 to 1;
        vColor:=NoiseToColor(vNoise); //Clamp Color values to MinMax 0,255 because Noise isn't perfect.
        Map(x,y):=vColor; //do not use multi dementional arrays for bitmaps must be a single block of memory. 
      end;
    end;
    Seed is only set once, when creating TWorldGenerator class (which in Create makes TPerlinNoise object and destroys it in Destroy). So perlin itself matches with each other. Problem is that caves don't (_genStepCarving, I think).

    Quote Originally Posted by SilverWarrior
    you need to integrate different kind of random number generator algorithm into it. This algorithm must be capable of accepting athleast two inputs (Seed number, Offset).
    Can you point me to such algorithm?
    Last edited by Darkhog; 03-06-2013 at 06:39 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •