public static void Generate() { //while (true) // Test.Show(RenderNoiseBmp(500, 500)); while (true) { var seed = Environment.TickCount; seed = new Random().Next(8, 16777216); // 16777216 = 8^8 var asdf = DateTime.Now; seed = asdf.Millisecond + asdf.Minute + asdf.Hour + asdf.Year; var rand = new Random(seed); var map = new PolygonMap(rand.Next()); Console.Out.WriteLine("Generating map..."); map.Generate(Size * 15); Console.Out.WriteLine("Creating terrain..."); var dat = CreateTerrain(rand.Next(), map); Console.Out.WriteLine("Computing biomes..."); new Biome(rand.Next(), map).ComputeBiomes(dat); new TerrainDisplay(dat).ShowDialog(); //Test.Show(RenderMoistBmp(dat)); //Test.Show(RenderEvalBmp(dat)); map = null; dat = null; GC.WaitForFullGCComplete(-1); GC.Collect(); } }
public static void Generate() { //while (true) // Test.Show(RenderNoiseBmp(500, 500)); while (true) { int seed = Environment.TickCount; seed = new Random().Next(8, 16777216); // 16777216 = 8^8 DateTime asdf = System.DateTime.Now; seed = asdf.Millisecond + asdf.Minute + asdf.Hour + asdf.Year; Random rand = new Random(seed); PolygonMap map = new PolygonMap(rand.Next()); Console.Out.WriteLine("Generating map..."); map.Generate(Size * 15); Console.Out.WriteLine("Creating terrain..."); var dat = CreateTerrain(rand.Next(), map); Console.Out.WriteLine("Computing biomes..."); new Biome(rand.Next(), map).ComputeBiomes(dat); new TerrainDisplay(dat).ShowDialog(); //Test.Show(RenderMoistBmp(dat)); //Test.Show(RenderEvalBmp(dat)); map = null; dat = null; GC.WaitForFullGCComplete(-1); GC.Collect(); } }
public static void Generate() { while (true) { int seed = Environment.TickCount; seed = new Random().Next(8, 1); // 16777216 = 8^8 DateTime asdf = DateTime.Now; seed = asdf.Millisecond + asdf.Minute + asdf.Hour + asdf.Year; Random rand = new Random(seed); PolygonMap map = new PolygonMap(rand.Next()); Console.Out.WriteLine("Generating map..."); map.Generate(Size); Console.Out.WriteLine("Creating terrain..."); TerrainTile[,] dat = CreateTerrain(rand.Next(), map); Console.Out.WriteLine("Computing biomes..."); new Biome(rand.Next(), map).ComputeBiomes(dat); new TerrainDisplay(dat).ShowDialog(); map = null; dat = null; GC.WaitForFullGCComplete(-1); GC.Collect(); } }
public static void Generate() { //while (true) // Test.Show(RenderNoiseBmp(500, 500)); while (true) { int seed = Environment.TickCount; //seed = 21409625; seed = 14727484; var rand = new Random(seed); var map = new PolygonMap(rand.Next()); map.Generate(Size * 15); TerrainTile[,] dat = CreateTerrain(rand.Next(), map); new Biome(rand.Next(), map).ComputeBiomes(dat); new TerrainDisplay(dat).ShowDialog(); //Test.Show(RenderMoistBmp(dat)); //Test.Show(RenderEvalBmp(dat)); map = null; dat = null; GC.WaitForFullGCComplete(-1); GC.Collect(); } }
public static void Generate() { //while (true) // Test.Show(RenderNoiseBmp(500, 500)); while (true) { int seed = Environment.TickCount; //seed = 21409625; seed = 14727484; Random rand = new Random(seed); PolygonMap map = new PolygonMap(rand.Next()); map.Generate(Size * 15); var dat = CreateTerrain(rand.Next(), map); new Biome(rand.Next(), map).ComputeBiomes(dat); new TerrainDisplay(dat).ShowDialog(); //Test.Show(RenderColorBmp(dat)); //Test.Show(RenderTerrainBmp(dat)); //Test.Show(RenderMoistBmp(dat)); //Test.Show(RenderEvalBmp(dat)); map = null; dat = null; GC.WaitForFullGCComplete(-1); GC.Collect(); } }
public static void Generate() { //while (true) // Test.Show(RenderNoiseBmp(500, 500)); while (true) { int seed = Environment.TickCount; //seed = 15465515; seed = 21409625; Random rand = new Random(seed); PolygonMap map = new PolygonMap(rand.Next()); map.Generate(Size * 6); var dat = CreateTerrain(rand.Next(), map); new Biome(rand.Next(), map).ComputeBiomes(dat); Test.Show(RenderColorBmp(dat)); Test.Show(RenderTerrainBmp(dat)); Test.Show(RenderMoistBmp(dat)); Test.Show(RenderEvalBmp(dat)); map = null; dat = null; GC.WaitForFullGCComplete(-1); GC.Collect(); } }