Started to implement road generation.

This commit is contained in:
2015-05-20 11:26:46 +03:00
parent 11ca59d8bb
commit 7bd2b7b255
24 changed files with 616 additions and 119 deletions

View File

@ -50,6 +50,8 @@ namespace TransportGame.Generator
float waterAmount = random.NextSingle(map.Biome.Moisture.Minimum, map.Biome.Moisture.Maximum);
map.WaterLevel = Mathf.Pow(waterAmount, ConfigurationManager.TerrGenConfig.WaterNonLinearPower) * map.Biome.Height;
DumpData(map, "dump.map");
return map;
}
@ -65,7 +67,7 @@ namespace TransportGame.Generator
{
for (int x = 0; x < map.Width; ++x)
for (int y = 0; y < map.Height; ++y)
map.Heights[x, y] = Noise.Generate(x, y, 0, 1);
map.Heightmap[x, y] = Noise.Generate(x, y, 0, 1);
}
private void DumpData(Map map, string filename)