Anixias
Member
I have written a set of scripts and a "class" called class_perlin. Basically, I call randomize() or random_set_seed(), then instantiate the perlin class. Then, I can access any location in the generated perlin noise. I can also set a "static" variable called noiseRepeat to anything above 0 if I want the perlin noise to wrap around after noiseRepeat distance.
It works perfectly! It has octaves, and I have a persistence function to deal with the weight of each successive octave. My only issue is that I need it to be modifiable such that the generated perlin noise follows specific rules without fail.
I'm using this perlin noise as a heightmap in an isometric RTS game. The generated perlin noise does not have any rules at all yet. I could easily add brightness and contrast to it, and keep increasing the brightness until I have the desired amount of land (water being anything below 30% brightness). However, I have many more needs than simply that.
If I want the map to be an island (or chain of islands), I can simply multiply a radial gradient (white in center, black on edge) across the whole map, and the edge is always guaranteed to be water, and if I multiply the whole map brightness by a certain scalar, I can ensure a certain amount of land with water always on the edge.
But, what if I want to ensure, every single time, that the generated map has at least one island per player, and that this island is large enough to allow expansion, and always has a specific amount of resources, and that there could be other random smaller uninhabited islands?
Or, what if I wanted an island for every team in this game? And that they are always big enough and far enough from other islands, and always have a specific minimum resources?
Think of Age of Empires 2, or Civ5. These games have map types, like Continents, where a few huge islands are generated and players are nearly evenly split amongst them. What if I want a map that is all land, with some rivers?
How could I modify the generated perlin noise to ensure that they follow any rule I could come up with? Of course, I won't be modifying how the perlin noise is actually generated at all. I would just modify what I read from it.
tl;dr
How could I use my perlin noise to create maps using different map types as in Age of Empires 2 or Civilization 5?
It works perfectly! It has octaves, and I have a persistence function to deal with the weight of each successive octave. My only issue is that I need it to be modifiable such that the generated perlin noise follows specific rules without fail.
I'm using this perlin noise as a heightmap in an isometric RTS game. The generated perlin noise does not have any rules at all yet. I could easily add brightness and contrast to it, and keep increasing the brightness until I have the desired amount of land (water being anything below 30% brightness). However, I have many more needs than simply that.
If I want the map to be an island (or chain of islands), I can simply multiply a radial gradient (white in center, black on edge) across the whole map, and the edge is always guaranteed to be water, and if I multiply the whole map brightness by a certain scalar, I can ensure a certain amount of land with water always on the edge.
But, what if I want to ensure, every single time, that the generated map has at least one island per player, and that this island is large enough to allow expansion, and always has a specific amount of resources, and that there could be other random smaller uninhabited islands?
Or, what if I wanted an island for every team in this game? And that they are always big enough and far enough from other islands, and always have a specific minimum resources?
Think of Age of Empires 2, or Civ5. These games have map types, like Continents, where a few huge islands are generated and players are nearly evenly split amongst them. What if I want a map that is all land, with some rivers?
How could I modify the generated perlin noise to ensure that they follow any rule I could come up with? Of course, I won't be modifying how the perlin noise is actually generated at all. I would just modify what I read from it.
tl;dr
How could I use my perlin noise to create maps using different map types as in Age of Empires 2 or Civilization 5?