private void TestGraphics() { //Setup a single test level MapGeneratorTemplated templateGen = new MapGeneratorTemplated(); var mapInfo = templateGen.GenerateTestGraphicsDungeon(); }
private void GenerateStoryDungeon() { //Setup a single test level MapGeneratorTemplated templateGen = new MapGeneratorTemplated(); //templateGen.GenerateMultiLevelDungeon(); var mapInfo = templateGen.GenerateDungeonWithStory(); LogFile.Log.LogEntryDebug("Player start: " + Game.Dungeon.Levels[Game.Dungeon.Player.LocationLevel].PCStartLocation, LogDebugLevel.High); //Extract connectivity map VisualiseConnectivityGraph(mapInfo.Model); }
public void TemplatedMapTest() { StandardGameSetup(); //int seedToUse = 150; //Game.Random = new Random(seedToUse); Game.Random = new Random(); bool testGraphics = false; bool multiLevelDungeon = false; bool storyDungeon = true; if (testGraphics) { TestGraphics(); } else { if (multiLevelDungeon) { GenerateMultiLevelDungeon(); } else if (storyDungeon) { GenerateStoryDungeon(); } else { //Setup a single test level MapGeneratorTemplated templateGen = new MapGeneratorTemplated(); //Map templateMap = templateGen.GenerateMap2(); Map templateMap = templateGen.GenerateMapBranchRooms(); int levelNo = Game.Dungeon.AddMap(templateMap); LogFile.Log.LogEntryDebug("Player start: " + Game.Dungeon.Levels[Game.Dungeon.Player.LocationLevel].PCStartLocation, LogDebugLevel.High); //Extract connectivity map var graphModel = new MapModel(templateGen.ConnectivityMap, 0); VisualiseConnectivityGraph(graphModel); } } RunGame(); }
public void TemplatedMapTest() { StandardGameSetup(); //int seedToUse = 150; //Game.Random = new Random(seedToUse); Game.Random = new Random(); bool testGraphics = false; bool multiLevelDungeon = false; bool storyDungeon = true; if (testGraphics) { TestGraphics(); } else { if (multiLevelDungeon) GenerateMultiLevelDungeon(); else if(storyDungeon) GenerateStoryDungeon(); else { //Setup a single test level MapGeneratorTemplated templateGen = new MapGeneratorTemplated(); //Map templateMap = templateGen.GenerateMap2(); Map templateMap = templateGen.GenerateMapBranchRooms(); int levelNo = Game.Dungeon.AddMap(templateMap); LogFile.Log.LogEntryDebug("Player start: " + Game.Dungeon.Levels[Game.Dungeon.Player.LocationLevel].PCStartLocation, LogDebugLevel.High); //Extract connectivity map var graphModel = new MapModel(templateGen.ConnectivityMap, 0); VisualiseConnectivityGraph(graphModel); } } RunGame(); }
private List<int> RebuildAllMaps() { List<int> dungeonLevelsToTest = new List<int>(); int totalLevels = 5; //15 for (int i = 0; i < totalLevels; i++) { dungeonLevelsToTest.Add(i); } bool experimentalTemplateGen = false; if(!experimentalTemplateGen) SpawnMapFlatline(dungeonLevelsToTest, false); else { //Setup a single test level MapGeneratorTemplated templateGen = new MapGeneratorTemplated(); Map templateMap = templateGen.GenerateMap(); int levelNo = Game.Dungeon.AddMap(templateMap); CalculateWalkableAndTCOD(); } //Write maps to disk MapExport exporter = new MapExport(); int index = 0; foreach (Map map in Game.Dungeon.Levels) { exporter.ExportMapToTextFile(map, "map-" + index + ".txt"); index++; } return dungeonLevelsToTest; }