├── .gitignore ├── Dependencies └── Readme.txt ├── LICENSE ├── MultiplayerGameProgramming.sln ├── MultiplayerGameProgramming ├── Globals.cs ├── MultiplayerGameProgramming.csproj ├── Properties │ └── AssemblyInfo.cs ├── Serialization │ ├── MoveBall.cs │ ├── Serialization.txt │ └── Vector3Surrogate.cs ├── Tcp │ ├── TCPChat.cs │ └── TcpConnectedClient.cs ├── UI │ ├── ButtonClient.cs │ ├── ButtonServer.cs │ ├── ChatBox.cs │ └── GuiHelpers.cs └── Udp │ ├── UDPChat.cs │ └── UdpConnectedClient.cs ├── UnityProject ├── Assets │ ├── Client.mat │ ├── Client.mat.meta │ ├── Code.meta │ ├── Code │ │ ├── Dlls.meta │ │ └── Dlls │ │ │ └── MultiplayerGameProgramming.dll.meta │ ├── Main.unity │ ├── Main.unity.meta │ ├── Server.mat │ └── Server.mat.meta ├── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NetworkManager.asset │ ├── Physics2DSettings.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ └── UnityConnectSettings.asset ├── UnityProject.csproj └── UnityProject.sln ├── test.exe └── test_Data ├── Mono └── etc │ └── mono │ ├── 1.0 │ ├── DefaultWsdlHelpGenerator.aspx │ └── machine.config │ ├── 2.0 │ ├── Browsers │ │ └── Compat.browser │ ├── DefaultWsdlHelpGenerator.aspx │ ├── machine.config │ ├── settings.map │ └── web.config │ ├── browscap.ini │ ├── config │ └── mconfig │ └── config.xml ├── Resources ├── unity default resources └── unity_builtin_extra ├── app.info ├── globalgamemanagers ├── globalgamemanagers.assets ├── level0 ├── level0.resS ├── output_log.txt ├── sharedassets0.assets └── sharedassets0.assets.resS /.gitignore: -------------------------------------------------------------------------------- 1 | **/[Ll]ibrary/ 2 | **/[Tt]emp/ 3 | **/[Oo]bj/ 4 | **/[Bb]uild/ 5 | **/[Bb]uilds/ 6 | **/Assets/AssetStoreTools* 7 | **/bin/Debug/ 8 | **/bin/Release/ 9 | /packages/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.unityproj 15 | *.tmp 16 | *.user 17 | *.userprefs 18 | *.pidb 19 | *.booproj 20 | *.svd 21 | *.dll 22 | *.dll.mdb* 23 | *.pdb* 24 | .suo 25 | .vs 26 | *.resx 27 | 28 | # Unity3D generated meta files 29 | *.pidb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | *.unitypackage 37 | *.log 38 | UnityFactory/SaveFile.bin 39 | -------------------------------------------------------------------------------- /Dependencies/Readme.txt: -------------------------------------------------------------------------------- 1 | Normally you would reference these files from C:\Program Files\Unity\Editor\Data\Managed and C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem. 2 | 3 | I put them here to help ensure references just work when you test this project. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 hardlydifficult 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26228.4 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiplayerGameProgramming", "MultiplayerGameProgramming\MultiplayerGameProgramming.csproj", "{6C09FF1C-E320-4ADF-A573-445C750D4498}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {6C09FF1C-E320-4ADF-A573-445C750D4498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {6C09FF1C-E320-4ADF-A573-445C750D4498}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {6C09FF1C-E320-4ADF-A573-445C750D4498}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {6C09FF1C-E320-4ADF-A573-445C750D4498}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/Globals.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using UnityEngine; 5 | 6 | namespace HD 7 | { 8 | public static class Globals 9 | { 10 | public const int port = 56789; 11 | 12 | public static bool isServer; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/MultiplayerGameProgramming.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {6C09FF1C-E320-4ADF-A573-445C750D4498} 8 | Library 9 | Properties 10 | HD 11 | MultiplayerGameProgramming 12 | v3.5 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | ..\UnityProject\Assets\Code\Dlls\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | true 24 | 25 | 26 | pdbonly 27 | true 28 | ..\UnityProject\Assets\Code\Dlls\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | ..\Dependencies\UnityEngine.dll 37 | False 38 | 39 | 40 | ..\Dependencies\UnityEngine.UI.dll 41 | False 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MultiplayerGameProgramming")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MultiplayerGameProgramming")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6c09ff1c-e320-4adf-a573-445c750d4498")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/Serialization/MoveBall.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using System.Runtime.Serialization; 6 | using System.Runtime.Serialization.Formatters.Binary; 7 | using System.IO; 8 | 9 | namespace HD 10 | { 11 | public class MoveBall : MonoBehaviour 12 | { 13 | public bool isForServerOnly; 14 | public MoveBall theOtherBall; 15 | public float percision = 1; 16 | const float min = -20; 17 | 18 | 19 | private void Update() 20 | { 21 | if(Globals.isServer && isForServerOnly || Globals.isServer == false && isForServerOnly == false) 22 | { 23 | if(Input.GetKey(KeyCode.RightArrow)) 24 | { 25 | transform.position += new Vector3(.1f, 0, 0); 26 | } 27 | else if(Input.GetKey(KeyCode.LeftArrow)) 28 | { 29 | transform.position -= new Vector3(.1f, 0, 0); 30 | } 31 | 32 | //{ // Approach 1 Serialize Vector 33 | // SurrogateSelector surrogateSelector = new SurrogateSelector(); 34 | // StreamingContext context = new StreamingContext(StreamingContextStates.Persistence); 35 | // BinaryFormatter formatter = new BinaryFormatter(surrogateSelector, context); 36 | // surrogateSelector.AddSurrogate(typeof(Vector3), context, new Vector3Surrogate()); 37 | 38 | // byte[] data; 39 | // using(MemoryStream stream = new MemoryStream()) 40 | // { 41 | // formatter.Serialize(stream, transform.position); 42 | // data = stream.GetBuffer(); 43 | // } 44 | 45 | // theOtherBall.SendPositionUpdateViaSerialization(data); 46 | //} 47 | 48 | { // Approach 2 Byte/Bit stream with entropy bit 49 | byte[] data, buffer; 50 | using(MemoryStream stream = new MemoryStream()) 51 | { 52 | // Compress the x position to ushort (16 bits) 53 | buffer = BitConverter.GetBytes(ConvertToFixed(transform.position.x)); 54 | stream.Write(buffer, 0, buffer.Length); 55 | 56 | // Simply send the y position 57 | buffer = BitConverter.GetBytes(transform.position.y); 58 | stream.Write(buffer, 0, buffer.Length); 59 | 60 | // Considering entropy, replace z with a bool when possible 61 | if(Math.Abs(transform.position.z) < .001) 62 | { 63 | buffer = BitConverter.GetBytes(true); // Currently this is a byte, could be improved to consume only a bit 64 | stream.Write(buffer, 0, buffer.Length); 65 | } 66 | else 67 | { 68 | buffer = BitConverter.GetBytes(false); 69 | stream.Write(buffer, 0, buffer.Length); 70 | buffer = BitConverter.GetBytes(transform.position.z); 71 | stream.Write(buffer, 0, buffer.Length); 72 | } 73 | 74 | data = stream.GetBuffer(); 75 | } 76 | 77 | theOtherBall.SendPositionUpdateViaMemoryStream(data); 78 | } 79 | } 80 | } 81 | 82 | short ConvertToFixed(float value) 83 | { 84 | return (short)((value - min) / percision); 85 | } 86 | 87 | float ConvertFromFixed(short value) 88 | { 89 | return value * percision + min; 90 | } 91 | 92 | private void SendPositionUpdateViaSerialization(byte[] data) 93 | { 94 | SurrogateSelector surrogateSelector = new SurrogateSelector(); 95 | StreamingContext context = new StreamingContext(StreamingContextStates.Persistence); 96 | BinaryFormatter formatter = new BinaryFormatter(surrogateSelector, context); 97 | surrogateSelector.AddSurrogate(typeof(Vector3), context, new Vector3Surrogate()); 98 | 99 | object objectGraph; 100 | using(MemoryStream stream = new MemoryStream(data)) 101 | { 102 | objectGraph = formatter.Deserialize(stream); 103 | } 104 | 105 | Vector3 newPosition = (Vector3)objectGraph; 106 | transform.position = new Vector3(newPosition.x, transform.position.y, newPosition.z); 107 | } 108 | 109 | private void SendPositionUpdateViaMemoryStream(byte[] data) 110 | { 111 | int currentOffset = 0; 112 | short compressedX = (short)BitConverter.ToInt16(data, currentOffset); 113 | currentOffset += sizeof(short); 114 | float x = ConvertFromFixed(compressedX); 115 | 116 | float y = BitConverter.ToSingle(data, currentOffset); 117 | currentOffset += sizeof(float); 118 | 119 | bool isZ0 = BitConverter.ToBoolean(data, currentOffset); 120 | currentOffset += sizeof(bool); 121 | 122 | float z; 123 | if(isZ0) 124 | { 125 | z = 0; 126 | } else 127 | { 128 | z = BitConverter.ToSingle(data, currentOffset); 129 | currentOffset += sizeof(float); 130 | } 131 | 132 | transform.position = new Vector3(x, transform.position.y, z); 133 | } 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/Serialization/Serialization.txt: -------------------------------------------------------------------------------- 1 |  - Define serialization 2 | x- Stream read/write Byte and Bits (for bit stream see 114) 3 | - Inlining 4 | - Linking by Ids (covered next ch, see p123 dealing with missing objects is not clear) 5 | - Compression 6 | -- Sparse Array compression (e.g. null terminating string) 7 | o-- Entropy Encoding - 'based on how unexpected it is' e.g. vector z usually 0. Also Huffman. See p127 8 | x-- Fixed Point - float compression by considering min, max, and precision to convert to ushort (ish). 9 | --- Geometry - Quaternion from 128 bits to 49 bits (convert xyz to ushort, calc w) (and Matrix) 10 | x- Serialize 11 | 12 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/Serialization/Vector3Surrogate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | using UnityEngine; 4 | 5 | namespace HD 6 | { 7 | public class Vector3Surrogate : ISerializationSurrogate 8 | { 9 | void ISerializationSurrogate.GetObjectData(object obj, SerializationInfo info, StreamingContext context) 10 | { 11 | Vector3 vector = (Vector3)obj; 12 | info.AddValue("x", vector.x); 13 | info.AddValue("y", vector.y); 14 | info.AddValue("z", vector.z); 15 | } 16 | 17 | object ISerializationSurrogate.SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) 18 | { 19 | float x = info.GetSingle("x"); 20 | float y = info.GetSingle("y"); 21 | float z = info.GetSingle("z"); 22 | return new Vector3(x, y, z); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/Tcp/TCPChat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using UnityEngine; 5 | using UnityEngine.UI; 6 | using System.Net.Sockets; 7 | using System.Net; 8 | using System.IO; 9 | 10 | namespace HD 11 | { 12 | /// Multithreading (may lead to a lot of mostly-idle threads), 13 | /// non-blocking, 14 | /// select (rec select or non-blocking on single thread) 15 | 16 | /// DNS 17 | //IPHostEntry ipHost = Dns.Resolve("google.com"); 18 | //ipHost.AddressList[0]; 19 | 20 | /// Select 21 | //List listOfSocketsToCheckForRead = new List(); 22 | //listOfSocketsToCheckForRead.Add(tcpClient.Client); 23 | //Socket.Select(listOfSocketsToCheckForRead, null, null, 0); 24 | //for(int i = 0; i < listOfSocketsToCheckForRead.Count; i++) 25 | //{ 26 | // listOfSocketsToCheckForRead[i].Receive(...); 27 | //} 28 | 29 | 30 | 31 | 32 | public class TCPChat : MonoBehaviour 33 | { 34 | #region Data 35 | public static TCPChat instance; 36 | 37 | public bool isServer; 38 | 39 | /// 40 | /// IP for clients to connect to. Null if you are the server. 41 | /// 42 | public IPAddress serverIp; 43 | 44 | /// 45 | /// For Clients, there is only one and it's the connection to the server. 46 | /// For Servers, there are many - one per connected client. 47 | /// 48 | List clientList = new List(); 49 | 50 | /// 51 | /// The string to render in Unity. 52 | /// 53 | public static string messageToDisplay; 54 | public Text text; 55 | 56 | /// 57 | /// Accepts new connections. Null for clients. 58 | /// 59 | TcpListener listener; 60 | #endregion 61 | 62 | #region Unity Events 63 | public void Awake() 64 | { 65 | instance = this; 66 | 67 | if(serverIp == null) 68 | { // Server: start listening for connections 69 | this.isServer = true; 70 | listener = new TcpListener(localaddr: IPAddress.Any, port: Globals.port); 71 | listener.Start(); 72 | listener.BeginAcceptTcpClient(OnServerConnect, null); 73 | } 74 | else 75 | { // Client: try connecting to the server 76 | TcpClient client = new TcpClient(); 77 | TcpConnectedClient connectedClient = new TcpConnectedClient(client); 78 | clientList.Add(connectedClient); 79 | client.BeginConnect(serverIp, Globals.port, (ar) => connectedClient.EndConnect(ar), null); 80 | } 81 | } 82 | 83 | protected void OnApplicationQuit() 84 | { 85 | listener?.Stop(); 86 | for(int i = 0; i < clientList.Count; i++) 87 | { 88 | clientList[i].Close(); 89 | } 90 | } 91 | 92 | protected void Update() 93 | { 94 | text.text = messageToDisplay; 95 | } 96 | #endregion 97 | 98 | #region Async Events 99 | void OnServerConnect(IAsyncResult ar) 100 | { 101 | TcpClient tcpClient = listener.EndAcceptTcpClient(ar); 102 | clientList.Add(new TcpConnectedClient(tcpClient)); 103 | 104 | listener.BeginAcceptTcpClient(OnServerConnect, null); 105 | } 106 | #endregion 107 | 108 | #region API 109 | public void OnDisconnect(TcpConnectedClient client) 110 | { 111 | clientList.Remove(client); 112 | } 113 | 114 | internal void Send( 115 | string message) 116 | { 117 | BroadcastChatMessage(message); 118 | 119 | if(isServer) 120 | { 121 | messageToDisplay += message + Environment.NewLine; 122 | } 123 | } 124 | 125 | internal static void BroadcastChatMessage(string message) 126 | { 127 | for(int i = 0; i < instance.clientList.Count; i++) 128 | { 129 | TcpConnectedClient client = instance.clientList[i]; 130 | client.Send(message); 131 | } 132 | } 133 | #endregion 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/Tcp/TcpConnectedClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Net.Sockets; 4 | using System.Runtime.Serialization; 5 | using UnityEngine; 6 | using System.Net; 7 | 8 | namespace HD 9 | { 10 | public class TcpConnectedClient 11 | { 12 | #region Data 13 | /// 14 | /// For Clients, the connection to the server. 15 | /// For Servers, the connection to a client. 16 | /// 17 | readonly TcpClient connection; 18 | 19 | readonly byte[] readBuffer = new byte[5000]; 20 | 21 | NetworkStream stream 22 | { 23 | get 24 | { 25 | return connection.GetStream(); 26 | } 27 | } 28 | #endregion 29 | 30 | #region Init 31 | public TcpConnectedClient(TcpClient tcpClient) 32 | { 33 | this.connection = tcpClient; 34 | this.connection.NoDelay = true; // Disable Nagle's cache algorithm 35 | if(TCPChat.instance.isServer) 36 | { // Client is awaiting EndConnect 37 | stream.BeginRead(readBuffer, 0, readBuffer.Length, OnRead, null); 38 | } 39 | } 40 | 41 | internal void Close() 42 | { 43 | connection.Close(); 44 | } 45 | #endregion 46 | 47 | #region Async Events 48 | void OnRead(IAsyncResult ar) 49 | { 50 | int length = stream.EndRead(ar); 51 | if(length <= 0) 52 | { // Connection closed 53 | TCPChat.instance.OnDisconnect(this); 54 | return; 55 | } 56 | 57 | string newMessage = System.Text.Encoding.UTF8.GetString(readBuffer, 0, length); 58 | TCPChat.messageToDisplay += newMessage + Environment.NewLine; 59 | 60 | if(TCPChat.instance.isServer) 61 | { 62 | TCPChat.BroadcastChatMessage(newMessage); 63 | } 64 | 65 | stream.BeginRead(readBuffer, 0, readBuffer.Length, OnRead, null); 66 | } 67 | 68 | internal void EndConnect(IAsyncResult ar) 69 | { 70 | connection.EndConnect(ar); 71 | 72 | stream.BeginRead(readBuffer, 0, readBuffer.Length, OnRead, null); 73 | } 74 | #endregion 75 | 76 | #region API 77 | internal void Send(string message) 78 | { 79 | byte[] buffer = System.Text.Encoding.UTF8.GetBytes(message); 80 | 81 | stream.Write(buffer, 0, buffer.Length); 82 | } 83 | #endregion 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/UI/ButtonClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using UnityEngine; 5 | using UnityEngine.UI; 6 | using System.Net; 7 | 8 | namespace HD 9 | { 10 | public class ButtonClient : MonoBehaviour 11 | { 12 | public GameObject tcpClient, udp; 13 | 14 | public void Awake() 15 | { 16 | GuiHelpers.OpenStep1(); 17 | } 18 | 19 | public void OnClick() 20 | { 21 | Globals.isServer = false; 22 | 23 | IPAddress ip = IPAddress.Parse(GameObject.Find("InputFieldIP").GetComponent().text); 24 | 25 | udp.GetComponent().serverIp = ip; 26 | tcpClient.GetComponent().serverIp = ip; 27 | 28 | udp.SetActive(true); 29 | tcpClient.SetActive(true); 30 | 31 | GuiHelpers.OpenStep2(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/UI/ButtonServer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using UnityEngine; 5 | 6 | namespace HD 7 | { 8 | public class ButtonServer : MonoBehaviour 9 | { 10 | public GameObject tcpServer, udp; 11 | 12 | public void OnClick() 13 | { 14 | Globals.isServer = true; 15 | tcpServer.SetActive(true); 16 | udp.SetActive(true); 17 | GuiHelpers.OpenStep2(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/UI/ChatBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using UnityEngine; 5 | using UnityEngine.UI; 6 | 7 | namespace HD 8 | { 9 | public class ChatBox : MonoBehaviour 10 | { 11 | public Text text; 12 | 13 | public void Send() 14 | { 15 | UDPChat.instance.Send(text.text); 16 | TCPChat.instance.Send(text.text); 17 | text.text = ""; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/UI/GuiHelpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using UnityEngine; 5 | 6 | namespace HD 7 | { 8 | public static class GuiHelpers 9 | { 10 | static GameObject step1, step2; 11 | 12 | public static void OpenStep1() 13 | { 14 | step1 = GameObject.Find("Step1"); 15 | step2 = GameObject.Find("Step2"); 16 | 17 | step1.SetActive(true); 18 | step2.SetActive(false); 19 | } 20 | 21 | public static void OpenStep2() 22 | { 23 | step1.SetActive(false); 24 | step2.SetActive(true); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/Udp/UDPChat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using UnityEngine; 5 | using UnityEngine.UI; 6 | using System.Net; 7 | using System.Net.Sockets; 8 | 9 | namespace HD 10 | { 11 | public class UDPChat : MonoBehaviour 12 | { 13 | #region Data 14 | public static UDPChat instance; 15 | 16 | public bool isServer; 17 | 18 | /// 19 | /// IP for clients to connect to. Null if you are the server. 20 | /// 21 | public IPAddress serverIp; 22 | 23 | /// 24 | /// For Clients, there is only one and it's the connection to the server. 25 | /// For Servers, there are many - one per connected client. 26 | /// 27 | List clientList = new List(); 28 | 29 | /// 30 | /// The string to render in Unity. 31 | /// 32 | public static string messageToDisplay; 33 | public Text text; 34 | 35 | UdpConnectedClient connection; 36 | #endregion 37 | 38 | #region Unity Events 39 | public void Awake() 40 | { 41 | instance = this; 42 | 43 | if(serverIp == null) 44 | { 45 | this.isServer = true; 46 | connection = new UdpConnectedClient(); 47 | } 48 | else 49 | { 50 | connection = new UdpConnectedClient(ip: serverIp); 51 | AddClient(new IPEndPoint(serverIp, Globals.port)); 52 | } 53 | } 54 | 55 | internal static void AddClient( 56 | IPEndPoint ipEndpoint) 57 | { 58 | if(instance.clientList.Contains(ipEndpoint) == false) 59 | { // If it's a new client, add to the client list 60 | UnityEngine.MonoBehaviour.print($"Connect to {ipEndpoint}"); 61 | instance.clientList.Add(ipEndpoint); 62 | } 63 | } 64 | 65 | /// 66 | /// TODO: We need to add timestamps to timeout and remove clients from the list. 67 | /// 68 | internal static void RemoveClient( 69 | IPEndPoint ipEndpoint) 70 | { 71 | instance.clientList.Remove(ipEndpoint); 72 | } 73 | 74 | private void OnApplicationQuit() 75 | { 76 | connection.Close(); 77 | } 78 | 79 | protected void Update() 80 | { 81 | text.text = messageToDisplay; 82 | } 83 | #endregion 84 | 85 | #region API 86 | public void Send( 87 | string message) 88 | { 89 | if(isServer) 90 | { 91 | messageToDisplay += message + Environment.NewLine; 92 | } 93 | 94 | BroadcastChatMessage(message); 95 | } 96 | 97 | internal static void BroadcastChatMessage(string message) 98 | { 99 | foreach(var ip in instance.clientList) 100 | { 101 | instance.connection.Send(message, ip); 102 | } 103 | } 104 | #endregion 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /MultiplayerGameProgramming/Udp/UdpConnectedClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using UnityEngine; 5 | using System.Net; 6 | using System.Net.Sockets; 7 | 8 | namespace HD 9 | { 10 | public class UdpConnectedClient 11 | { 12 | #region Data 13 | /// 14 | /// For Clients, the connection to the server. 15 | /// For Servers, the connection to a client. 16 | /// 17 | readonly UdpClient connection; 18 | #endregion 19 | 20 | #region Init 21 | public UdpConnectedClient(IPAddress ip = null) 22 | { 23 | if(UDPChat.instance.isServer) 24 | { 25 | connection = new UdpClient(Globals.port); 26 | } 27 | else 28 | { 29 | connection = new UdpClient(); // Auto-bind port 30 | } 31 | connection.BeginReceive(OnReceive, null); 32 | } 33 | 34 | public void Close() 35 | { 36 | connection.Close(); 37 | } 38 | #endregion 39 | 40 | #region API 41 | void OnReceive(IAsyncResult ar) 42 | { 43 | try 44 | { 45 | IPEndPoint ipEndpoint = null; 46 | byte[] data = connection.EndReceive(ar, ref ipEndpoint); 47 | 48 | UDPChat.AddClient(ipEndpoint); 49 | 50 | string message = System.Text.Encoding.UTF8.GetString(data); 51 | UDPChat.messageToDisplay += message + Environment.NewLine; 52 | 53 | if(UDPChat.instance.isServer) 54 | { 55 | UDPChat.BroadcastChatMessage(message); 56 | } 57 | } 58 | catch(SocketException e) 59 | { 60 | // This happens when a client disconnects, as we fail to send to that port. 61 | } 62 | connection.BeginReceive(OnReceive, null); 63 | } 64 | 65 | internal void Send(string message, IPEndPoint ipEndpoint) 66 | { 67 | byte[] data = System.Text.Encoding.UTF8.GetBytes(message); 68 | connection.Send(data, data.Length, ipEndpoint); 69 | } 70 | #endregion 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /UnityProject/Assets/Client.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/Assets/Client.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Client.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbfc75832a5c6104f8e29f907580a8a9 3 | timeCreated: 1494214231 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Code.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1219441973558b442870e5e9ab5d929c 3 | folderAsset: yes 4 | timeCreated: 1491447623 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Code/Dlls.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37dbe09483c04cd4d9beed37a8c880d3 3 | folderAsset: yes 4 | timeCreated: 1491447623 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Code/Dlls/MultiplayerGameProgramming.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b39b582411669042aa914c155eeafe3 3 | timeCreated: 1491447735 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /UnityProject/Assets/Main.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/Assets/Main.unity -------------------------------------------------------------------------------- /UnityProject/Assets/Main.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca6d58bfbeac3e84bbf3fd22e2e91aa9 3 | timeCreated: 1491447969 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Server.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/Assets/Server.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Server.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3485a3904b8bbb34d896d31470d8827d 3 | timeCreated: 1494214225 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.6.0f3 2 | -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/UnityProject/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /UnityProject/UnityProject.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 10.0.20506 7 | 2.0 8 | {3926CF29-3B43-7E6B-CD6E-78688E6772C2} 9 | Library 10 | Assembly-CSharp 11 | 512 12 | {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 13 | .NETFramework 14 | v3.5 15 | Unity Subset v3.5 16 | 17 | 18 | Game:1 19 | StandaloneWindows:5 20 | 5.6.0f3 21 | 22 | 23 | 4 24 | 25 | 26 | pdbonly 27 | false 28 | Temp\UnityVS_bin\Debug\ 29 | Temp\UnityVS_obj\Debug\ 30 | prompt 31 | 4 32 | DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_5_6_0;UNITY_5_6;UNITY_5;UNITY_ANALYTICS;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;ENABLE_VIDEO;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU 33 | false 34 | 35 | 36 | pdbonly 37 | false 38 | Temp\UnityVS_bin\Release\ 39 | Temp\UnityVS_obj\Release\ 40 | prompt 41 | 4 42 | TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_5_6_0;UNITY_5_6;UNITY_5;UNITY_ANALYTICS;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;ENABLE_VIDEO;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU 43 | false 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Library\UnityAssemblies\UnityEngine.dll 56 | 57 | 58 | Library\UnityAssemblies\UnityEngine.UI.dll 59 | 60 | 61 | Library\UnityAssemblies\UnityEngine.Networking.dll 62 | 63 | 64 | Library\UnityAssemblies\UnityEngine.TestRunner.dll 65 | 66 | 67 | Library\UnityAssemblies\nunit.framework.dll 68 | 69 | 70 | Library\UnityAssemblies\UnityEngine.Analytics.dll 71 | 72 | 73 | Library\UnityAssemblies\UnityEngine.HoloLens.dll 74 | 75 | 76 | Library\UnityAssemblies\UnityEngine.VR.dll 77 | 78 | 79 | Library\UnityAssemblies\UnityEditor.dll 80 | 81 | 82 | Assets\Code\Dlls\MultiplayerGameProgramming.dll 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /UnityProject/UnityProject.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2017 4 | Global 5 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 6 | Debug|Any CPU = Debug|Any CPU 7 | Release|Any CPU = Release|Any CPU 8 | EndGlobalSection 9 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 10 | EndGlobalSection 11 | GlobalSection(SolutionProperties) = preSolution 12 | HideSolutionNode = FALSE 13 | EndGlobalSection 14 | EndGlobal 15 | -------------------------------------------------------------------------------- /test.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test.exe -------------------------------------------------------------------------------- /test_Data/Mono/etc/mono/1.0/DefaultWsdlHelpGenerator.aspx: -------------------------------------------------------------------------------- 1 | <%-- 2 | // 3 | // DefaultWsdlHelpGenerator.aspx: 4 | // 5 | // Author: 6 | // Lluis Sanchez Gual (lluis@ximian.com) 7 | // 8 | // (C) 2003 Ximian, Inc. http://www.ximian.com 9 | // 10 | --%> 11 | 12 | <%@ Import Namespace="System.Collections" %> 13 | <%@ Import Namespace="System.IO" %> 14 | <%@ Import Namespace="System.Xml.Serialization" %> 15 | <%@ Import Namespace="System.Xml" %> 16 | <%@ Import Namespace="System.Xml.Schema" %> 17 | <%@ Import Namespace="System.Web.Services.Description" %> 18 | <%@ Import Namespace="System" %> 19 | <%@ Import Namespace="System.Net" %> 20 | <%@ Import Namespace="System.Globalization" %> 21 | <%@ Import Namespace="System.Resources" %> 22 | <%@ Import Namespace="System.Diagnostics" %> 23 | <%@ Import Namespace="System.CodeDom" %> 24 | <%@ Import Namespace="System.CodeDom.Compiler" %> 25 | <%@ Import Namespace="Microsoft.CSharp" %> 26 | <%@ Import Namespace="Microsoft.VisualBasic" %> 27 | <%@ Import Namespace="System.Text" %> 28 | <%@ Import Namespace="System.Text.RegularExpressions" %> 29 | <%@ Import Namespace="System.Security.Cryptography.X509Certificates" %> 30 | <%@ Assembly name="System.Web.Services" %> 31 | <%@ Page debug="true" %> 32 | 33 | 34 | 1545 | 1546 | 1547 | 1548 | 1549 | <%=WebServiceName%> Web Service 1550 | 1578 | 1579 | 1585 | 1586 | 1587 | 1588 | 1589 |
1590 | Web Service
1591 | <%=WebServiceName%> 1592 |
1593 | 1594 | 1598 | 1599 | 1600 | 1815 | 1816 | 1817 | 1818 |
1601 |
1602 | Overview
1603 |
1604 | Service Description 1605 |
1606 | Client proxy 1607 |

1608 | 1609 | 1610 | <%#FormatBindingName(DataBinder.Eval(Container.DataItem, "Name").ToString())%> 1611 | 1612 | 1613 | op=<%#GetOpName(Container.DataItem)%>&bnd=<%#DataBinder.Eval(Container.DataItem, "Binding.Name")%>"><%#GetOpName(Container.DataItem)%> 1614 |
1615 |
1616 |
1617 |
1618 |
1619 |
1620 | 1621 |
1622 | 1623 | <% if (CurrentPage == "main") {%> 1624 | 1625 | 1629 | 1630 |

Web Service Overview

1631 | <%=WebServiceDescription%> 1632 | 1633 | <%} if (DefaultBinding == null) {%> 1634 | This service does not contain any public web method. 1635 | <%} else if (CurrentPage == "op") {%> 1636 | 1637 | 1641 | 1642 | <%=CurrentOperationName%> 1643 |

1644 | <% WriteTabs (); %> 1645 |


1646 | 1647 | <% if (CurrentTab == "main") { %> 1648 | Input Parameters 1649 |
1650 | <% if (InParams.Count == 0) { %> 1651 | No input parameters
1652 | <% } else { %> 1653 | 1654 | 1655 | 1656 | 1657 | 1658 | 1659 | 1660 | 1661 | 1662 |
<%#DataBinder.Eval(Container.DataItem, "Name")%><%#DataBinder.Eval(Container.DataItem, "Type")%>
1663 | <% } %> 1664 |
1665 | 1666 | <% if (OutParams.Count > 0) { %> 1667 | Output Parameters 1668 |
1669 | 1670 | 1671 | 1672 | 1673 | 1674 | 1675 | 1676 | 1677 | 1678 |
<%#DataBinder.Eval(Container.DataItem, "Name")%><%#DataBinder.Eval(Container.DataItem, "Type")%>
1679 |
1680 | <% } %> 1681 | 1682 | Remarks 1683 |
1684 | <%=OperationDocumentation%> 1685 |

1686 | Technical information 1687 |
1688 | Format: <%=CurrentOperationFormat%> 1689 |
Supported protocols: <%=CurrentOperationProtocols%> 1690 | <% } %> 1691 | 1692 | 1696 | 1697 | <% if (CurrentTab == "test") { 1698 | if (CurrentOperationSupportsTest) {%> 1699 | Enter values for the parameters and click the 'Invoke' button to test this method:

1700 |
1701 | 1702 | 1703 | 1704 | 1705 | 1706 | 1707 | 1708 | 1709 | 1710 | 1711 | 1712 | 1713 | 1714 | 1715 | 1716 |
<%#DataBinder.Eval(Container.DataItem, "Name")%>: ">
 
1717 |
1718 |
"> 1719 | The web service returned the following result:

1720 |
<%=GetTestResult()%>
1721 |
1722 | <% } else {%> 1723 | The test form is not available for this operation because it has parameters with a complex structure. 1724 | <% } %> 1725 | <% } %> 1726 | 1727 | 1731 | 1732 | <% if (CurrentTab == "msg") { %> 1733 | 1734 | The following are sample SOAP requests and responses for each protocol supported by this method: 1735 |

1736 | 1737 | <% if (IsOperationSupported ("Soap")) { %> 1738 | Soap 1739 |

1740 |
<%=GenerateOperationMessages ("Soap", true)%>
1741 |
1742 |
<%=GenerateOperationMessages ("Soap", false)%>
1743 |
1744 | <% } %> 1745 | <% if (IsOperationSupported ("HttpGet")) { %> 1746 | HTTP Get 1747 |

1748 |
<%=GenerateOperationMessages ("HttpGet", true)%>
1749 |
1750 |
<%=GenerateOperationMessages ("HttpGet", false)%>
1751 |
1752 | <% } %> 1753 | <% if (IsOperationSupported ("HttpPost")) { %> 1754 | HTTP Post 1755 |

1756 |
<%=GenerateOperationMessages ("HttpPost", true)%>
1757 |
1758 |
<%=GenerateOperationMessages ("HttpPost", false)%>
1759 |
1760 | <% } %> 1761 | 1762 | <% } %> 1763 | <%} else if (CurrentPage == "proxy") {%> 1764 | 1768 |
1769 | Select the language for which you want to generate a proxy 1770 |   1771 | 1775 |    1776 |
1777 |
1778 | <%=CurrentProxytName%>    1779 | Download 1780 |

1781 |
1782 |
<%=GetProxyCode ()%>
1783 |
1784 | <%} else if (CurrentPage == "wsdl") {%> 1785 | 1789 | <% if (descriptions.Count > 1 || schemas.Count > 1) {%> 1790 | The description of this web service is composed by several documents. Click on the document you want to see: 1791 | 1792 | 1800 | 1801 | <%} else {%> 1802 | <%}%> 1803 |
1804 | <%=CurrentDocumentName%>    1805 | Download 1806 |

1807 |
1808 |
<%=GenerateDocument ()%>
1809 |
1810 | 1811 | <%}%> 1812 | 1813 |














1814 |
1819 | 1820 | 1821 | -------------------------------------------------------------------------------- /test_Data/Mono/etc/mono/1.0/machine.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
9 |
10 | 11 |
13 |
15 |
17 |
19 |
21 |
23 |
25 |
27 |
29 |
31 |
33 |
35 |
37 |
39 |
41 | 42 | 43 |
45 |
47 |
49 |
51 |
53 | 54 |
55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 116 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 135 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 154 | 161 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | -------------------------------------------------------------------------------- /test_Data/Mono/etc/mono/2.0/Browsers/Compat.browser: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /test_Data/Mono/etc/mono/2.0/machine.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | 22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | 58 |
59 |
60 |
61 |
62 | 63 |
64 | 65 | 66 |
67 |
68 |
69 | 70 |
71 | 72 |
73 |
74 |
75 | 76 |
77 | 78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | 87 |
88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 100 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 170 | 173 | 176 | 179 | 182 | 185 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | -------------------------------------------------------------------------------- /test_Data/Mono/etc/mono/2.0/settings.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 10 | 11 | 20 | 23 | 24 | 25 | 26 | 29 | 30 | 33 | 34 | 43 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /test_Data/Mono/etc/mono/2.0/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 64 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 108 | 110 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /test_Data/Mono/etc/mono/browscap.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test_Data/Mono/etc/mono/browscap.ini -------------------------------------------------------------------------------- /test_Data/Mono/etc/mono/config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test_Data/Mono/etc/mono/mconfig/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 11 | 14 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
88 |
89 |
90 |
91 |
92 | 93 | 94 | 95 | 97 | ]]> 98 | 99 | 100 | 101 | 102 | 103 | 104 |
105 |
106 |
107 | 108 | 109 | 110 | 112 | 113 |
114 | 115 |
116 |
117 |
118 |
119 | 120 | 121 | 122 | ]]> 123 | 124 | 125 | 126 | 127 | 128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 | 136 | 137 | 138 | 140 | 141 | ]]> 142 | 143 | 144 | 145 | 146 | 147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 | 155 | 156 | 157 | 159 | 160 | 161 | 162 | 163 | ]]> 164 | 165 | 166 | 167 | 168 | 169 |
170 |
171 |
172 |
173 |
174 | 175 | 176 | 177 | 179 | 180 | 181 | 182 | ]]> 183 | 184 | 185 | 186 | 187 | 188 |
189 |
190 |
191 |
192 |
193 | 194 | 195 | 196 | 198 | ]]> 199 | 200 | 201 | 202 | 203 | 204 |
205 |
206 |
207 |
208 |
209 | 210 | 211 | 212 | 215 | 216 | 217 | 218 | 220 | 221 | 222 | 223 | 224 | ]]> 225 | 226 | 227 | 228 | 229 | 230 |
231 |
232 |
233 | 234 | 235 | 236 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | ]]> 248 | 249 | 250 | 251 | 252 | 253 |
254 |
255 |
256 | 257 | 258 | 259 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 272 | 274 | 275 | 276 | ]]> 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 |
285 |
286 |
287 | 288 | 289 | 290 | 292 | 293 |
294 | 295 |
296 |
297 |
298 | 299 | 300 | 301 | ]]> 302 | 303 | 304 | 305 | 306 | 307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 | 315 | 316 | 317 | 319 | ]]> 320 | 321 | 322 | 323 | 324 | 325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 | 333 | 334 | 335 | 337 | ]]> 338 | 339 | 340 | 341 | 342 | 343 |
344 |
345 |
346 |
347 |
348 | 349 | 350 | 351 | 353 | 354 | 355 | 356 | ]]> 357 | 358 | 359 | 360 | 361 | 362 |
363 |
364 |
365 |
366 |
367 | 368 | 369 | 370 | 372 | ]]> 373 | 374 | 375 | 376 | 377 | 378 |
379 |
380 |
381 | 382 | 383 | 384 | 386 | 387 | 388 | 395 | 396 | 399 | 400 | 403 | 408 | 409 | 412 | 413 | ]]> 414 | 415 | 416 | 417 | 418 | 419 |
420 |
421 |
422 | 423 | 424 | 425 | 427 | 428 | 429 | 430 | 431 | 432 | 434 | 436 | 437 | 438 | ]]> 439 | 440 | 441 | 442 | 443 | 444 | 445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 | 453 | 454 | 455 | 457 | ]]> 458 | 459 | 460 | 461 | 462 | 463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 | 471 | 472 | 473 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | ]]> 483 | 484 | 485 | 486 | 487 | 488 |
489 |
490 |
491 |
492 |
493 | 494 | 495 | 496 | 498 | ]]> 499 | 500 | 501 | 502 | 503 | 504 | 506 | 507 | ]]> 508 | 509 | 510 | 511 | 513 | 514 | ]]> 515 | 516 | 517 | 518 | 520 | 521 | ]]> 522 | 523 | 524 | 525 | 527 | 528 | ]]> 529 | 530 | 531 | 532 | 534 | 535 | ]]> 536 | 537 | 538 | 539 | 541 | 542 | ]]> 543 | 544 | 545 | 546 | 548 | 549 | ]]> 550 | 551 | 552 | 553 | 555 | 556 | ]]> 557 | 558 | 559 | 560 | 562 | 563 | ]]> 564 | 565 | 566 | 567 | 569 | 570 | ]]> 571 | 572 | 573 | 574 | 576 | 577 | ]]> 578 | 579 | 580 | 581 | 583 | ]]> 584 | 585 | 586 | 587 | 589 | 590 | ]]> 591 | 592 | 593 | 594 | 596 | 597 | ]]> 598 | 599 | 600 | 601 | 603 | 604 | ]]> 605 | 606 | 607 | 608 | 609 |
610 |
611 |
612 |
613 |
614 |
615 | 616 | 617 | -------------------------------------------------------------------------------- /test_Data/Resources/unity default resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test_Data/Resources/unity default resources -------------------------------------------------------------------------------- /test_Data/Resources/unity_builtin_extra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test_Data/Resources/unity_builtin_extra -------------------------------------------------------------------------------- /test_Data/app.info: -------------------------------------------------------------------------------- 1 | DefaultCompany 2 | Multiplayer Game Programming -------------------------------------------------------------------------------- /test_Data/globalgamemanagers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test_Data/globalgamemanagers -------------------------------------------------------------------------------- /test_Data/globalgamemanagers.assets: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test_Data/globalgamemanagers.assets -------------------------------------------------------------------------------- /test_Data/level0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test_Data/level0 -------------------------------------------------------------------------------- /test_Data/level0.resS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test_Data/level0.resS -------------------------------------------------------------------------------- /test_Data/output_log.txt: -------------------------------------------------------------------------------- 1 | Initialize engine version: 5.6.0f3 (497a0f351392) 2 | GfxDevice: creating device client; threaded=1 3 | Direct3D: 4 | Version: Direct3D 11.0 [level 11.0] 5 | Renderer: NVIDIA GeForce GTX 760 (ID=0x1187) 6 | Vendor: NVIDIA 7 | VRAM: 2017 MB 8 | Driver: 22.21.13.8189 9 | Begin MonoManager ReloadAssembly 10 | Platform assembly: C:\Code\MultiplayerGameProgramming\test_Data\Managed\UnityEngine.dll (this message is harmless) 11 | Loading C:\Code\MultiplayerGameProgramming\test_Data\Managed\UnityEngine.dll into Unity Child Domain 12 | Platform assembly: C:\Code\MultiplayerGameProgramming\test_Data\Managed\UnityEngine.UI.dll (this message is harmless) 13 | Loading C:\Code\MultiplayerGameProgramming\test_Data\Managed\UnityEngine.UI.dll into Unity Child Domain 14 | Platform assembly: C:\Code\MultiplayerGameProgramming\test_Data\Managed\UnityEngine.Networking.dll (this message is harmless) 15 | Loading C:\Code\MultiplayerGameProgramming\test_Data\Managed\UnityEngine.Networking.dll into Unity Child Domain 16 | Platform assembly: C:\Code\MultiplayerGameProgramming\test_Data\Managed\UnityEngine.Analytics.dll (this message is harmless) 17 | Loading C:\Code\MultiplayerGameProgramming\test_Data\Managed\UnityEngine.Analytics.dll into Unity Child Domain 18 | Platform assembly: C:\Code\MultiplayerGameProgramming\test_Data\Managed\MultiplayerGameProgramming.dll (this message is harmless) 19 | Loading C:\Code\MultiplayerGameProgramming\test_Data\Managed\MultiplayerGameProgramming.dll into Unity Child Domain 20 | - Completed reload, in 0.076 seconds 21 | Platform assembly: C:\Code\MultiplayerGameProgramming\test_Data\Managed\System.Core.dll (this message is harmless) 22 | Platform assembly: C:\Code\MultiplayerGameProgramming\test_Data\Managed\System.dll (this message is harmless) 23 | desktop: 1920x1080 60Hz; virtual: 1920x2130 at 0,0 24 | Initializing input. 25 | XInput1_3.dll not found. Trying XInput9_1_0.dll instead... 26 | Input initialized. 27 | Initialized touch support. 28 | UnloadTime: 0.940890 ms 29 | Setting up 3 worker threads for Enlighten. 30 | Thread -> id: 2c64 -> priority: 1 31 | Thread -> id: 235c -> priority: 1 32 | Thread -> id: 4d90 -> priority: 1 33 | Connect to 127.0.0.1:50678 34 | 35 | (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 36 | 37 | -------------------------------------------------------------------------------- /test_Data/sharedassets0.assets: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test_Data/sharedassets0.assets -------------------------------------------------------------------------------- /test_Data/sharedassets0.assets.resS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HardlyDifficult/MultiplayerGameProgramming/f3c1faaf023db84fafc3f15a4010ef92b927215c/test_Data/sharedassets0.assets.resS --------------------------------------------------------------------------------