Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075922 Posts in 44152 Topics- by 36120 Members - Latest Member: Royalhandstudios

December 29, 2014, 03:46:44 PM
  Show Posts
Pages: [1]
1  Developer / Technical / Re: procedurally generated content - Qs about prime numbers, seeds and value noise on: February 16, 2012, 05:49:56 AM
Thank you both for explaining.

Looks like I'll be seeding like this:
Code:
public static int Noise(int seed, int x, int y, int frequency, int octaves)
{
     x += seed;
     y += seed; //seed could be added to either or both dimensions to select a unique range
     //PNRG code omitted
}
That's for making 2d noise maps usually no bigger than 5000x5000 -- so if I pick seeds that are are 5000 apart the noise should be completely unique.

The full algo is here if anyone is interested: http://www.java-gaming.org/index.php?topic=23771.0. DzzD was nice enough to release it as LGPL.
2  Feedback / DevLogs / Re: moonman on: February 15, 2012, 01:15:45 AM
I'm excited to play this game. I joined this forum pretty much just to say that.

So what were your thoughts on the poll? Sorry if I missed the reply... I'm just curious what is coming next.

Also, have you mentioned much about your world generator? Once again sorry if it is already covered somewhere. I've been obsessed with procedural generation and wanted to know what sort of tricks you used to make moonman's world.
3  Developer / Technical / procedurally generated content - Qs about prime numbers, seeds and value noise on: February 15, 2012, 12:57:17 AM
Hello! I'm new around here. I have recently become obsessed with noise generation and I had some questions. I've been overlaying perlin-esque noise maps with some fun effects (images available in my signature). I've got no issue using the noise algos at a basic level, but I want to understand more about what is actually happening.

I've been using algos that are predominately value noise, based around Hugo Elias' writings.

The PRNG is as follows:
Code:
  function IntNoise(32-bit integer: x)
    x = (x<<13) ^ x;
    return ( 1.0 - ( (x * (x * x * 15731 + 789221) + 1376312589) & 7fffffff) / 1073741824.0);   
  end IntNoise function

Why is this function a good candidate for a PRNG?
What do the prime numbers do?
I've tried replacing the prime numbers with non prime numbers and sometimes this resulted in the generation of a repeating pattern. Other times however, I've removed a prime number and the pattern does not repeat (or at least it doesn't obviously repeat).
Currently I treat the prime numbers as seeds. If I want a new seed then I have to find a similarly sized prime number to replace one of the above. Is there another way to seed this type of noise?
Pages: [1]
Theme orange-lt created by panic