Having troubles with LibNoise.XNA and generating tileable maps
- by Jon
Following up on my previous post, I found a wonderful port of LibNoise for XNA. I've been working with it for about 8 hours straight and I'm tearing my hair out - I just can not get maps to tile, I can't figure out how to do this.
Here's my attempt:
Perlin perlin = new Perlin(1.2, 1.95, 0.56, 12, 2353, QualityMode.Medium);
RiggedMultifractal rigged = new RiggedMultifractal();
Add add = new Add(perlin, rigged);
// Initialize the noise map
int mapSize = 64;
this.m_noiseMap = new Noise2D(mapSize, perlin);
//this.m_noiseMap.GeneratePlanar(0, 1, -1, 1);
// Generate the textures
this.m_noiseMap.GeneratePlanar(-1,1,-1,1);
this.m_textures[0] = this.m_noiseMap.GetTexture(this.graphics.GraphicsDevice, Gradient.Grayscale);
this.m_noiseMap.GeneratePlanar(mapSize, mapSize * 2, mapSize, mapSize * 2);
this.m_textures[1] = this.m_noiseMap.GetTexture(this.graphics.GraphicsDevice, Gradient.Grayscale);
this.m_noiseMap.GeneratePlanar(-1, 1, -1, 1);
this.m_textures[2] = this.m_noiseMap.GetTexture(this.graphics.GraphicsDevice, Gradient.Grayscale);
The first and third ones generate fine, they create a perlin noise map - however the middle one, which I wanted to be a continuation of the first (As per my original post), is just a bunch of static.
How exactly do I get this to generate maps that connect to each other, by entering in the mapsize * tile, using the same seed, settings, etc.?