internal void GenerateCivilization(PolyMap polymap) { _basemap = polymap; landlist = _basemap.centerlist.FindAll(x => x.mapData.Water == false); GenerateVilliagePaths(); GenerateCities(); }
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(); }
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); }