diff --git a/Game/Assets/Scripts/Business/Generator/BuildingGenerator.cs b/Game/Assets/Scripts/Business/Generator/BuildingGenerator.cs index ac058bb..967b41d 100644 --- a/Game/Assets/Scripts/Business/Generator/BuildingGenerator.cs +++ b/Game/Assets/Scripts/Business/Generator/BuildingGenerator.cs @@ -17,7 +17,7 @@ namespace TransportGame.Generator private float LotSquareMaxSize { get { return ConfigManager.Buildgen.LotSquareMaxSize; } } private float LotSpacing { get { return ConfigManager.Buildgen.LotSpacing; } } - private Map map; + private CityMap map; QuadTree nodeTree; QuadTree lotTree; @@ -214,7 +214,7 @@ namespace TransportGame.Generator return b; } - public void Generate(Map map) + public void Generate(CityMap map) { this.map = map; map.Buildings = new List(); diff --git a/Game/Assets/Scripts/Business/Generator/CityGenerator.cs b/Game/Assets/Scripts/Business/Generator/CityGenerator.cs index a4a4952..a871d21 100644 --- a/Game/Assets/Scripts/Business/Generator/CityGenerator.cs +++ b/Game/Assets/Scripts/Business/Generator/CityGenerator.cs @@ -19,9 +19,9 @@ namespace TransportGame.Generator /// Width /// Height /// City - public Map Generate(int width, int height) + public CityMap Generate(int width, int height) { - Map map; + CityMap map; // Generate terrain TerrainGenerator terrainGen = new TerrainGenerator(); diff --git a/Game/Assets/Scripts/Business/Generator/PopulationCentersGenerator.cs b/Game/Assets/Scripts/Business/Generator/PopulationCentersGenerator.cs index 5e709f9..13edfd5 100644 --- a/Game/Assets/Scripts/Business/Generator/PopulationCentersGenerator.cs +++ b/Game/Assets/Scripts/Business/Generator/PopulationCentersGenerator.cs @@ -11,7 +11,7 @@ namespace TransportGame.Generator { System.Random random = new System.Random(); - public void Generate(Map map) + public void Generate(CityMap map) { // Generate range float mp = (float)(map.Width * map.Height) / (1024 * 1024); // For 4k x 4k range should be around 900 diff --git a/Game/Assets/Scripts/Business/Generator/RoadGenerator.cs b/Game/Assets/Scripts/Business/Generator/RoadGenerator.cs index bef9e76..ca86a1c 100644 --- a/Game/Assets/Scripts/Business/Generator/RoadGenerator.cs +++ b/Game/Assets/Scripts/Business/Generator/RoadGenerator.cs @@ -49,7 +49,7 @@ namespace TransportGame.Generator List queue; System.Random random = new System.Random(); - Map map; + CityMap map; private float HighwaySegmentLength { get { return ConfigManager.Roadgen.HighwaySegmentLength; } } private float DefaultBranchPopulationTreshold { get { return ConfigManager.Roadgen.DefaultBranchPopulationTreshold; } } @@ -71,7 +71,7 @@ namespace TransportGame.Generator { } - public void Initialize(Map map) + public void Initialize(CityMap map) { this.map = map; map.RoadNetwork = new RoadNetwork(); @@ -142,7 +142,7 @@ namespace TransportGame.Generator return !map.IsInside(p.X, p.Y) || map.IsWater(p.X, p.Y) || map.GetSteepness(p.X, p.Y) > SteepnessLimit; } - public void Generate(Map map) + public void Generate(CityMap map) { Initialize(map); diff --git a/Game/Assets/Scripts/Business/Generator/TerrainGenerator.cs b/Game/Assets/Scripts/Business/Generator/TerrainGenerator.cs index f3fac12..7fd3fe5 100644 --- a/Game/Assets/Scripts/Business/Generator/TerrainGenerator.cs +++ b/Game/Assets/Scripts/Business/Generator/TerrainGenerator.cs @@ -34,10 +34,10 @@ namespace TransportGame.Generator Noise.Scale = ConfigManager.Tergen.ElevationScale; } - public Map Generate(int width, int height) + public CityMap Generate(int width, int height) { // Create map - Map map = new Map(width, height); + CityMap map = new CityMap(width, height); // Pick a random biome map.Biome = PickBiome(); @@ -61,7 +61,7 @@ namespace TransportGame.Generator return BiomeManager.Biomes.ElementAt(biome); } - private void GenerateElevation(Map map) + private void GenerateElevation(CityMap map) { for (int x = 0; x < map.Width; ++x) for (int y = 0; y < map.Height; ++y) diff --git a/Game/Assets/Scripts/Model/Map.cs b/Game/Assets/Scripts/Model/CityMap.cs similarity index 98% rename from Game/Assets/Scripts/Model/Map.cs rename to Game/Assets/Scripts/Model/CityMap.cs index 513f682..f78e16b 100644 --- a/Game/Assets/Scripts/Model/Map.cs +++ b/Game/Assets/Scripts/Model/CityMap.cs @@ -10,7 +10,7 @@ using UnityEngine; namespace TransportGame.Model { [XmlRoot("map")] - public class Map + public class CityMap { private float[,] heightmap; @@ -108,7 +108,7 @@ namespace TransportGame.Model /// /// Warning: heights array will be null. /// - public Map() + public CityMap() { PopulationCenters = new List(); } @@ -118,7 +118,7 @@ namespace TransportGame.Model /// /// Width /// Height - public Map(int width, int height) + public CityMap(int width, int height) { heightmap = new float[width, height]; PopulationCenters = new List(); diff --git a/Game/Assets/Scripts/Model/Map.cs.meta b/Game/Assets/Scripts/Model/CityMap.cs.meta similarity index 100% rename from Game/Assets/Scripts/Model/Map.cs.meta rename to Game/Assets/Scripts/Model/CityMap.cs.meta diff --git a/Game/Assets/Scripts/Unity/BuildingMeshGenerator.cs b/Game/Assets/Scripts/Unity/BuildingMeshGenerator.cs index ad1fbed..294637f 100644 --- a/Game/Assets/Scripts/Unity/BuildingMeshGenerator.cs +++ b/Game/Assets/Scripts/Unity/BuildingMeshGenerator.cs @@ -14,10 +14,10 @@ namespace TransportGame.Unity public Texture2D[] Textures { get; set; } private GameObject parent = new GameObject("buildings"); - private Map map; + private CityMap map; private System.Random random = new System.Random(); - public IEnumerable Generate(Map map) + public IEnumerable Generate(CityMap map) { this.map = map; int i = 0; diff --git a/Game/Assets/Scripts/Unity/RoadMeshGenerator.cs b/Game/Assets/Scripts/Unity/RoadMeshGenerator.cs index 8e3b58a..75468b2 100644 --- a/Game/Assets/Scripts/Unity/RoadMeshGenerator.cs +++ b/Game/Assets/Scripts/Unity/RoadMeshGenerator.cs @@ -35,7 +35,7 @@ namespace TransportGame.Unity #region Private fields - private Map map; + private CityMap map; private Dictionary segmentTerminal1Limit = new Dictionary(); private Dictionary segmentTerminal2Limit = new Dictionary(); @@ -47,7 +47,7 @@ namespace TransportGame.Unity public Material RoadMaterial { get; set; } public Material SidewalkMaterial { get; set; } - public IEnumerable Generate(Map map) + public IEnumerable Generate(CityMap map) { this.map = map; diff --git a/Game/Assets/Scripts/Unity/TerrainGeneratorScript.cs b/Game/Assets/Scripts/Unity/TerrainGeneratorScript.cs index c1c7cca..33c838c 100644 --- a/Game/Assets/Scripts/Unity/TerrainGeneratorScript.cs +++ b/Game/Assets/Scripts/Unity/TerrainGeneratorScript.cs @@ -9,7 +9,7 @@ using UnityEngine; public class TerrainGeneratorScript : MonoBehaviour { - private Map map = null; + private CityMap map = null; public int TerrainWidth = 1024; public int TerrainHeight = 1024; diff --git a/Game/Assets/Scripts/Utils/Logger.cs b/Game/Assets/Scripts/Utils/Logger.cs index becc142..12bd456 100644 --- a/Game/Assets/Scripts/Utils/Logger.cs +++ b/Game/Assets/Scripts/Utils/Logger.cs @@ -91,7 +91,7 @@ namespace TransportGame.Utils Log(Level.Critical, "{0}: {1}\nStack trace:{2}", ex.GetType().ToString(), ex.Message, ex.StackTrace); } - public static void DumpMap(Map map, string filename) + public static void DumpMap(CityMap map, string filename) { map.SerializeXml(Path.Combine(LogsDirectory, filename)); } diff --git a/Game/Game-csharp.sln b/Game/Game-csharp.sln index 5b0c91f..2d38414 100644 --- a/Game/Game-csharp.sln +++ b/Game/Game-csharp.sln @@ -23,7 +23,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution + GlobalSection(MonoDevelopProperties) = preSolution StartupItem = Assembly-CSharp.csproj Policies = $0 $0.TextStylePolicy = $1 diff --git a/Game/Game.sln b/Game/Game.sln index 7f5cc16..5c83234 100644 --- a/Game/Game.sln +++ b/Game/Game.sln @@ -29,7 +29,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution + GlobalSection(MonoDevelopProperties) = preSolution StartupItem = Assembly-CSharp.csproj Policies = $0 $0.TextStylePolicy = $1 diff --git a/Game/TransportGame_Data/Managed/Assembly-CSharp-firstpass.dll b/Game/TransportGame_Data/Managed/Assembly-CSharp-firstpass.dll index 7f01c59..2f71ce9 100644 Binary files a/Game/TransportGame_Data/Managed/Assembly-CSharp-firstpass.dll and b/Game/TransportGame_Data/Managed/Assembly-CSharp-firstpass.dll differ diff --git a/Game/TransportGame_Data/Managed/Assembly-CSharp-firstpass.dll.mdb b/Game/TransportGame_Data/Managed/Assembly-CSharp-firstpass.dll.mdb index fa50cf1..000cf1f 100644 Binary files a/Game/TransportGame_Data/Managed/Assembly-CSharp-firstpass.dll.mdb and b/Game/TransportGame_Data/Managed/Assembly-CSharp-firstpass.dll.mdb differ diff --git a/Game/TransportGame_Data/Managed/Assembly-CSharp.dll b/Game/TransportGame_Data/Managed/Assembly-CSharp.dll index 0a15aad..6e7ecb0 100644 Binary files a/Game/TransportGame_Data/Managed/Assembly-CSharp.dll and b/Game/TransportGame_Data/Managed/Assembly-CSharp.dll differ diff --git a/Game/TransportGame_Data/Managed/Assembly-CSharp.dll.mdb b/Game/TransportGame_Data/Managed/Assembly-CSharp.dll.mdb index dc8c760..a336f26 100644 Binary files a/Game/TransportGame_Data/Managed/Assembly-CSharp.dll.mdb and b/Game/TransportGame_Data/Managed/Assembly-CSharp.dll.mdb differ diff --git a/Game/TransportGame_Data/Managed/Assembly-UnityScript-firstpass.dll b/Game/TransportGame_Data/Managed/Assembly-UnityScript-firstpass.dll index a4bbd58..4397e12 100644 Binary files a/Game/TransportGame_Data/Managed/Assembly-UnityScript-firstpass.dll and b/Game/TransportGame_Data/Managed/Assembly-UnityScript-firstpass.dll differ diff --git a/Game/TransportGame_Data/Managed/Assembly-UnityScript-firstpass.dll.mdb b/Game/TransportGame_Data/Managed/Assembly-UnityScript-firstpass.dll.mdb index 6da2f60..87a9523 100644 Binary files a/Game/TransportGame_Data/Managed/Assembly-UnityScript-firstpass.dll.mdb and b/Game/TransportGame_Data/Managed/Assembly-UnityScript-firstpass.dll.mdb differ diff --git a/Game/TransportGame_Data/PlayerConnectionConfigFile b/Game/TransportGame_Data/PlayerConnectionConfigFile index ca7f7d2..a68b89a 100644 --- a/Game/TransportGame_Data/PlayerConnectionConfigFile +++ b/Game/TransportGame_Data/PlayerConnectionConfigFile @@ -1 +1 @@ -listen 2605474146 1 1 \ No newline at end of file +listen 3964677318 1 1 \ No newline at end of file diff --git a/Game/TransportGame_Data/output_log.txt b/Game/TransportGame_Data/output_log.txt index 8368fcf..f3a55a7 100644 --- a/Game/TransportGame_Data/output_log.txt +++ b/Game/TransportGame_Data/output_log.txt @@ -16,7 +16,7 @@ Platform assembly: C:\Users\Tibi\Google Drive\FacultateCY\$ Licenta\Game\Transpo Loading C:\Users\Tibi\Google Drive\FacultateCY\$ Licenta\Game\TransportGame_Data\Managed\Assembly-UnityScript-firstpass.dll into Unity Child Domain Platform assembly: C:\Users\Tibi\Google Drive\FacultateCY\$ Licenta\Game\TransportGame_Data\Managed\UnityEngine.UI.dll (this message is harmless) Loading C:\Users\Tibi\Google Drive\FacultateCY\$ Licenta\Game\TransportGame_Data\Managed\UnityEngine.UI.dll into Unity Child Domain -- Completed reload, in 0.081 seconds +- Completed reload, in 0.045 seconds desktop: 1920x1080 60Hz; virtual: 1920x1080 at 0,0 Initializing input. Input initialized. @@ -84,14 +84,3 @@ TransportGame.Utils.Logger:Info(String, Object[]) (at C:\Users\Tibi\Google Drive (Filename: C:/Users/Tibi/Google Drive/FacultateCY/$ Licenta/Game/Assets/Scripts/Utils/Logger.cs Line: 66) -Finished generating road mesh. -UnityEngine.Debug:Internal_Log(Int32, String, Object) -UnityEngine.Debug:Log(Object) -TransportGame.Utils.Logger:Log(Level, String, Object[]) (at C:\Users\Tibi\Google Drive\FacultateCY\$ Licenta\Game\Assets\Scripts\Utils\Logger.cs:66) -TransportGame.Utils.Logger:Info(String, Object[]) (at C:\Users\Tibi\Google Drive\FacultateCY\$ Licenta\Game\Assets\Scripts\Utils\Logger.cs:74) -TransportGame.Unity.c__Iterator2:MoveNext() (at C:\Users\Tibi\Google Drive\FacultateCY\$ Licenta\Game\Assets\Scripts\Unity\RoadMeshGenerator.cs:95) -TransportGame.Utils.c__Iterator8:MoveNext() (at C:\Users\Tibi\Google Drive\FacultateCY\$ Licenta\Game\Assets\Scripts\Utils\Task.cs:82) -c__Iterator3:MoveNext() (at C:\Users\Tibi\Google Drive\FacultateCY\$ Licenta\Game\Assets\Scripts\Unity\TerrainGeneratorScript.cs:146) - -(Filename: C:/Users/Tibi/Google Drive/FacultateCY/$ Licenta/Game/Assets/Scripts/Utils/Logger.cs Line: 66) - diff --git a/Game/TransportGame_Data/sharedassets0.assets b/Game/TransportGame_Data/sharedassets0.assets index f2df281..039f067 100644 Binary files a/Game/TransportGame_Data/sharedassets0.assets and b/Game/TransportGame_Data/sharedassets0.assets differ diff --git a/Game/UnityVS.Game.CSharp.csproj b/Game/UnityVS.Game.CSharp.csproj index 9b31a49..d11fc8f 100644 --- a/Game/UnityVS.Game.CSharp.csproj +++ b/Game/UnityVS.Game.CSharp.csproj @@ -7,14 +7,16 @@ 2.0 {02576F1D-BE9C-CFA7-763D-1EBF63B36977} Library - + + Assembly-CSharp 512 {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} .NETFramework v3.5 Unity Subset v3.5 - + + Game:1 StandaloneWindows64:19 5.0.1f1 @@ -85,7 +87,7 @@ - + @@ -117,4 +119,4 @@ - + \ No newline at end of file