Exemplo n.º 1
0
        public IslandMapGenerator(int SeedX, int SeedY, int WX, int WY)
        {
            wx = WX;
            wy = WY;

            ipd  = wx / 4;
            sipd = ipd / 2;

            buffer    = wx / 8;
            useRegion = wx - (buffer * 2);

            sx = SeedX;
            sy = SeedY;

            ipc       = 20;
            IslandMap = new IslandMap(wx, sx, sy);

            Stopwatch Watch = new Stopwatch();

            Watch.Start();
            generateMainLand();
            Debug.WriteLine("MainLand: " + Watch.Elapsed.TotalMilliseconds);
            Watch.Restart();
            generateLake();
            Debug.WriteLine("Lake: " + Watch.Elapsed.TotalMilliseconds);
            Watch.Restart();
            generateMountains();
            Debug.WriteLine("Mountain: " + Watch.Elapsed.TotalMilliseconds);
            Watch.Restart();
            GenerateHeightMap();
            Debug.WriteLine("Heightmap: " + Watch.Elapsed.TotalMilliseconds);
            Watch.Restart();
            GenerateMoistureMap();
            Debug.WriteLine("Moisture: " + Watch.Elapsed.TotalMilliseconds);
            Watch.Restart();
            GenerateLakeVillage();
            Debug.WriteLine("Village: " + Watch.Elapsed.TotalMilliseconds);
            Watch.Restart();
            GenerateVegation();
            Debug.WriteLine("Vegetation: " + Watch.Elapsed.TotalMilliseconds);
            Watch.Stop();
        }
Exemplo n.º 2
0
 public MapDataGenerator(int SX, int SY)
 {
     polyGen = new IslandMapGenerator(SX, SY, ApplicationSettings.worldSize * ApplicationSettings.chunkSize + 1, ApplicationSettings.worldSize * ApplicationSettings.chunkSize + 1);
     map     = polyGen.IslandMap;
 }