Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    [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.

  2. #2
    Quote Originally Posted by Darkhog View Post
    I've got my terrain generator to working, but bad thing is it seems to not generate ground blocks and spikes even though it should.
    What exactly goes wrong? It generates in a way you not expected or just not generates anything?

Page 2 of 2 FirstFirst 12

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
  •