Exemplo n.º 1
0
 internal void GenerateCivilization(PolyMap polymap)
 {
     _basemap = polymap;
     landlist = _basemap.centerlist.FindAll(x => x.mapData.Water == false);
     GenerateVilliagePaths();
     GenerateCities();
 }
Exemplo n.º 2
0
 internal void GenerateIsland(PolyMap voronoigraph, double variant)
 {
     cornerQueue = new Queue <Corners>();
     _basegraph  = voronoigraph;
     foreach (Corners crn in _basegraph.cornerlist)
     {
         AssignLandandBaseElevations(crn, variant);
     }
     while (cornerQueue.Count > 0)
     {
         RaisetheIsland();
     }
     RedistributeElevations(LandCorners(_basegraph.cornerlist));
     AssignOceanCoastandLandToCenter();
     CalculateDownslopes();
     CreateRivers();
     Mmmmoist();
     AssignBiomes();
 }
Exemplo n.º 3
0
        internal void createimage(int points, double variant)
        {
            pointgen         = new PointGenerator(_RandomSeed);
            VoronoiGenerator = new CubesVoronoiMapper();
            var pointlist  = pointgen.Givemepoints(points);
            var voronoimap = VoronoiGenerator.GimmesomeVeoroiois(pointlist);
            var polymap    = new PolyMap(voronoimap, pointlist);

            IslandGenerator.GenerateIsland(polymap, variant);
            TownGenerator.GenerateCivilization(polymap);
            var b           = new Bitmap(1000, 1000);
            var g           = Graphics.FromImage(b);
            var finallimage = ImagePainter.DrawIsland(pointlist, polymap.edgelist);
            //var finallimage = ImagePainter.DrawMapGraph(pointlist, polymap.edgelist);
            //finallimage = ImagePainter.DrawVoronoi(pointlist, voronoimap);
            string savestring = string.Format("E:\\Projects\\MapGenerator\\Images\\Image{0}.PNG", DateTime.Now.Ticks);

            finallimage.Save(@savestring, ImageFormat.Png);
        }