diff --git a/Samples/LibraryTestSamples/ManySample/ManyClients/ManyClients.csproj b/Samples/LibraryTestSamples/ManySample/ManyClients/ManyClients.csproj index 885307c..82b16f2 100644 --- a/Samples/LibraryTestSamples/ManySample/ManyClients/ManyClients.csproj +++ b/Samples/LibraryTestSamples/ManySample/ManyClients/ManyClients.csproj @@ -99,7 +99,6 @@ Resources.resx True - SettingsSingleFileGenerator Settings.Designer.cs diff --git a/Samples/LibraryTestSamples/ManySample/ManyServer/ManyServer.csproj b/Samples/LibraryTestSamples/ManySample/ManyServer/ManyServer.csproj index efebf05..4db38e6 100644 --- a/Samples/LibraryTestSamples/ManySample/ManyServer/ManyServer.csproj +++ b/Samples/LibraryTestSamples/ManySample/ManyServer/ManyServer.csproj @@ -61,7 +61,6 @@ Resources.resx True - SettingsSingleFileGenerator Settings.Designer.cs diff --git a/Samples/LibraryTestSamples/UnconnectedSample/UnconnectedSample/UnconnectedSample.csproj b/Samples/LibraryTestSamples/UnconnectedSample/UnconnectedSample/UnconnectedSample.csproj index 765bc8f..0331fd2 100644 --- a/Samples/LibraryTestSamples/UnconnectedSample/UnconnectedSample/UnconnectedSample.csproj +++ b/Samples/LibraryTestSamples/UnconnectedSample/UnconnectedSample/UnconnectedSample.csproj @@ -61,7 +61,6 @@ Resources.resx True - SettingsSingleFileGenerator Settings.Designer.cs diff --git a/Samples/Old XNA sample.zip b/Samples/Old XNA sample.zip new file mode 100644 index 0000000..a1233ce Binary files /dev/null and b/Samples/Old XNA sample.zip differ diff --git a/Samples/XNA sample/XnaGameClient.sln b/Samples/XNA sample/XnaGameClient.sln deleted file mode 100644 index 096a4f6..0000000 --- a/Samples/XNA sample/XnaGameClient.sln +++ /dev/null @@ -1,62 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C# Express 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XnaGameClient", "XnaGameClient\XnaGameClient.csproj", "{D084E1C2-CE6B-42A5-918E-37EC7D2B5132}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XnaGameServer", "XnaGameServer\XnaGameServer.csproj", "{2A16EEC3-99B7-45D8-B185-6E1101225540}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network", "..\..\Lidgren.Network\Lidgren.Network.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XnaGameClientContent", "XnaGameClient\Content\Content.contentproj", "{416F5A82-22D8-4A94-BC19-4C6A24F34A73}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Debug|Any CPU.ActiveCfg = Debug|x86 - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Debug|x86.ActiveCfg = Debug|x86 - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Debug|x86.Build.0 = Debug|x86 - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Release|Any CPU.ActiveCfg = Release|x86 - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Release|Mixed Platforms.Build.0 = Release|x86 - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Release|x86.ActiveCfg = Release|x86 - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132}.Release|x86.Build.0 = Release|x86 - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Debug|x86.ActiveCfg = Debug|Any CPU - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Release|Any CPU.Build.0 = Release|Any CPU - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {2A16EEC3-99B7-45D8-B185-6E1101225540}.Release|x86.ActiveCfg = Release|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|x86.ActiveCfg = Debug|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.Build.0 = Release|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.ActiveCfg = Release|Any CPU - {416F5A82-22D8-4A94-BC19-4C6A24F34A73}.Debug|Any CPU.ActiveCfg = Debug|x86 - {416F5A82-22D8-4A94-BC19-4C6A24F34A73}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {416F5A82-22D8-4A94-BC19-4C6A24F34A73}.Debug|x86.ActiveCfg = Debug|x86 - {416F5A82-22D8-4A94-BC19-4C6A24F34A73}.Release|Any CPU.ActiveCfg = Release|x86 - {416F5A82-22D8-4A94-BC19-4C6A24F34A73}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {416F5A82-22D8-4A94-BC19-4C6A24F34A73}.Release|x86.ActiveCfg = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Samples/XNA sample/XnaGameClient/Content/Content.contentproj b/Samples/XNA sample/XnaGameClient/Content/Content.contentproj deleted file mode 100644 index d524091..0000000 --- a/Samples/XNA sample/XnaGameClient/Content/Content.contentproj +++ /dev/null @@ -1,75 +0,0 @@ - - - 416f5a82-22d8-4a94-bc19-4c6a24f34a73 - {96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - x86 - Library - Properties - v3.5 - v3.1 - x86 - bin\$(Platform)\$(Configuration) - - - Windows - - - Windows - - - - False - - - False - - - False - - - False - - - False - - - False - - - - - c1 - TextureImporter - TextureProcessor - - - c2 - TextureImporter - TextureProcessor - - - c3 - TextureImporter - TextureProcessor - - - c4 - TextureImporter - TextureProcessor - - - c5 - TextureImporter - TextureProcessor - - - - - \ No newline at end of file diff --git a/Samples/XNA sample/XnaGameClient/Content/c1.png b/Samples/XNA sample/XnaGameClient/Content/c1.png deleted file mode 100644 index 3dc7c29..0000000 Binary files a/Samples/XNA sample/XnaGameClient/Content/c1.png and /dev/null differ diff --git a/Samples/XNA sample/XnaGameClient/Content/c2.png b/Samples/XNA sample/XnaGameClient/Content/c2.png deleted file mode 100644 index dc0538b..0000000 Binary files a/Samples/XNA sample/XnaGameClient/Content/c2.png and /dev/null differ diff --git a/Samples/XNA sample/XnaGameClient/Content/c3.png b/Samples/XNA sample/XnaGameClient/Content/c3.png deleted file mode 100644 index 90f2278..0000000 Binary files a/Samples/XNA sample/XnaGameClient/Content/c3.png and /dev/null differ diff --git a/Samples/XNA sample/XnaGameClient/Content/c4.png b/Samples/XNA sample/XnaGameClient/Content/c4.png deleted file mode 100644 index baef177..0000000 Binary files a/Samples/XNA sample/XnaGameClient/Content/c4.png and /dev/null differ diff --git a/Samples/XNA sample/XnaGameClient/Content/c5.png b/Samples/XNA sample/XnaGameClient/Content/c5.png deleted file mode 100644 index 9d9f958..0000000 Binary files a/Samples/XNA sample/XnaGameClient/Content/c5.png and /dev/null differ diff --git a/Samples/XNA sample/XnaGameClient/Content/obj/x86/Debug/Content.contentproj.FileListAbsolute.txt b/Samples/XNA sample/XnaGameClient/Content/obj/x86/Debug/Content.contentproj.FileListAbsolute.txt deleted file mode 100644 index 638af78..0000000 --- a/Samples/XNA sample/XnaGameClient/Content/obj/x86/Debug/Content.contentproj.FileListAbsolute.txt +++ /dev/null @@ -1,2 +0,0 @@ -D:\dev\GoogleCode\lidgren-network\Generation3\Samples\XNA sample\XnaGameClient\XnaGameClient\Content\obj\x86\Debug\ResolveAssemblyReference.cache -D:\dev\GoogleCode\lidgren-network\Generation3\Samples\XNA sample\XnaGameClient\Content\obj\x86\Debug\ResolveAssemblyReference.cache diff --git a/Samples/XNA sample/XnaGameClient/Content/obj/x86/Debug/ContentPipeline.xml b/Samples/XNA sample/XnaGameClient/Content/obj/x86/Debug/ContentPipeline.xml deleted file mode 100644 index 802dd9b..0000000 --- a/Samples/XNA sample/XnaGameClient/Content/obj/x86/Debug/ContentPipeline.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - c1.png - c1 - TextureImporter - TextureProcessor - None - F:\dev\GoogleCode\lidgren-network-gen3\Samples\XNA sample\XnaGameClient\bin\x86\Debug\Content\c1.xnb - - - - c2.png - c2 - TextureImporter - TextureProcessor - None - F:\dev\GoogleCode\lidgren-network-gen3\Samples\XNA sample\XnaGameClient\bin\x86\Debug\Content\c2.xnb - - - - c3.png - c3 - TextureImporter - TextureProcessor - None - F:\dev\GoogleCode\lidgren-network-gen3\Samples\XNA sample\XnaGameClient\bin\x86\Debug\Content\c3.xnb - - - - c4.png - c4 - TextureImporter - TextureProcessor - None - F:\dev\GoogleCode\lidgren-network-gen3\Samples\XNA sample\XnaGameClient\bin\x86\Debug\Content\c4.xnb - - - - c5.png - c5 - TextureImporter - TextureProcessor - None - F:\dev\GoogleCode\lidgren-network-gen3\Samples\XNA sample\XnaGameClient\bin\x86\Debug\Content\c5.xnb - - - true - - Windows - HiDef - Debug - false - F:\dev\GoogleCode\lidgren-network-gen3\Samples\XNA sample\XnaGameClient\Content\ - F:\dev\GoogleCode\lidgren-network-gen3\Samples\XNA sample\XnaGameClient\ - F:\dev\GoogleCode\lidgren-network-gen3\Samples\XNA sample\XnaGameClient\Content\obj\x86\Debug\ - F:\dev\GoogleCode\lidgren-network-gen3\Samples\XNA sample\XnaGameClient\bin\x86\Debug\Content\ - - - - C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll - 2010-08-23T12:41:18+02:00 - - - C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll - 2010-08-23T12:41:18+02:00 - - - C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll - 2010-08-23T12:41:18+02:00 - - - C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll - 2010-08-23T12:41:18+02:00 - - - C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll - 2010-08-23T12:41:18+02:00 - - - C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll - 2010-08-23T12:41:18+02:00 - - - C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll - 2010-10-29T20:35:38.8804757+02:00 - - - - \ No newline at end of file diff --git a/Samples/XNA sample/XnaGameClient/Content/obj/x86/Debug/ResolveAssemblyReference.cache b/Samples/XNA sample/XnaGameClient/Content/obj/x86/Debug/ResolveAssemblyReference.cache deleted file mode 100644 index 9f2b931..0000000 Binary files a/Samples/XNA sample/XnaGameClient/Content/obj/x86/Debug/ResolveAssemblyReference.cache and /dev/null differ diff --git a/Samples/XNA sample/XnaGameClient/Game.ico b/Samples/XNA sample/XnaGameClient/Game.ico deleted file mode 100644 index 8cff41e..0000000 Binary files a/Samples/XNA sample/XnaGameClient/Game.ico and /dev/null differ diff --git a/Samples/XNA sample/XnaGameClient/Game1.cs b/Samples/XNA sample/XnaGameClient/Game1.cs deleted file mode 100644 index 08b898e..0000000 --- a/Samples/XNA sample/XnaGameClient/Game1.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using System.Collections.Generic; - -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Input; - -using Lidgren.Network; - -namespace XnaGameClient -{ - /// - /// This is the main type for your game - /// - public class Game1 : Microsoft.Xna.Framework.Game - { - GraphicsDeviceManager graphics; - SpriteBatch spriteBatch; - - Texture2D[] textures; - Dictionary positions = new Dictionary(); - NetClient client; - - public Game1() - { - graphics = new GraphicsDeviceManager(this); - Content.RootDirectory = "Content"; - - NetPeerConfiguration config = new NetPeerConfiguration("xnaapp"); - config.EnableMessageType(NetIncomingMessageType.DiscoveryResponse); - - client = new NetClient(config); - client.Start(); - } - - protected override void Initialize() - { - client.DiscoverLocalPeers(14242); - base.Initialize(); - } - - protected override void LoadContent() - { - spriteBatch = new SpriteBatch(GraphicsDevice); - textures = new Texture2D[5]; - for (int i = 0; i < 5; i++) - textures[i] = Content.Load("c" + (i + 1)); - } - - protected override void Update(GameTime gameTime) - { - // - // Collect input - // - int xinput = 0; - int yinput = 0; - KeyboardState keyState = Keyboard.GetState(); - - // exit game if escape or Back is pressed - if (keyState.IsKeyDown(Keys.Escape) || GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) - this.Exit(); - - // use arrows or dpad to move avatar - if (GamePad.GetState(PlayerIndex.One).DPad.Left == ButtonState.Pressed || keyState.IsKeyDown(Keys.Left)) - xinput = -1; - if (GamePad.GetState(PlayerIndex.One).DPad.Right == ButtonState.Pressed || keyState.IsKeyDown(Keys.Right)) - xinput = 1; - if (GamePad.GetState(PlayerIndex.One).DPad.Up == ButtonState.Pressed || keyState.IsKeyDown(Keys.Up)) - yinput = -1; - if (GamePad.GetState(PlayerIndex.One).DPad.Down == ButtonState.Pressed || keyState.IsKeyDown(Keys.Down)) - yinput = 1; - - if (xinput != 0 || yinput != 0) - { - // - // If there's input; send it to server - // - NetOutgoingMessage om = client.CreateMessage(); - om.Write(xinput); // very inefficient to send a full Int32 (4 bytes) but we'll use this for simplicity - om.Write(yinput); - client.SendMessage(om, NetDeliveryMethod.Unreliable); - } - - // read messages - NetIncomingMessage msg; - while ((msg = client.ReadMessage()) != null) - { - switch (msg.MessageType) - { - case NetIncomingMessageType.DiscoveryResponse: - // just connect to first server discovered - client.Connect(msg.SenderEndpoint); - break; - case NetIncomingMessageType.Data: - // server sent a position update - long who = msg.ReadInt64(); - int x = msg.ReadInt32(); - int y = msg.ReadInt32(); - positions[who] = new Vector2(x, y); - break; - } - } - - base.Update(gameTime); - } - - protected override void Draw(GameTime gameTime) - { - GraphicsDevice.Clear(Color.CornflowerBlue); - - spriteBatch.Begin(SpriteSortMode.Texture, BlendState.AlphaBlend); - - // draw all players - foreach (var kvp in positions) - { - // use player unique identifier to choose an image - int num = Math.Abs((int)kvp.Key) % textures.Length; - - // draw player - spriteBatch.Draw(textures[num], kvp.Value, Color.White); - } - - spriteBatch.End(); - - base.Draw(gameTime); - } - - protected override void OnExiting(object sender, EventArgs args) - { - client.Shutdown("bye"); - - base.OnExiting(sender, args); - } - } -} diff --git a/Samples/XNA sample/XnaGameClient/GameThumbnail.png b/Samples/XNA sample/XnaGameClient/GameThumbnail.png deleted file mode 100644 index 462311a..0000000 Binary files a/Samples/XNA sample/XnaGameClient/GameThumbnail.png and /dev/null differ diff --git a/Samples/XNA sample/XnaGameClient/Program.cs b/Samples/XNA sample/XnaGameClient/Program.cs deleted file mode 100644 index a536e98..0000000 --- a/Samples/XNA sample/XnaGameClient/Program.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace XnaGameClient -{ - static class Program - { - /// - /// The main entry point for the application. - /// - static void Main(string[] args) - { - using (Game1 game = new Game1()) - { - game.Run(); - } - } - } -} - diff --git a/Samples/XNA sample/XnaGameClient/Properties/AssemblyInfo.cs b/Samples/XNA sample/XnaGameClient/Properties/AssemblyInfo.cs deleted file mode 100644 index 93bde73..0000000 --- a/Samples/XNA sample/XnaGameClient/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("XnaGameClient")] -[assembly: AssemblyProduct("XnaGameClient")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCompany("Microsoft")] - -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d2337e59-5903-486c-a4f0-4beb3020c965")] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] diff --git a/Samples/XNA sample/XnaGameClient/XnaGameClient.csproj b/Samples/XNA sample/XnaGameClient/XnaGameClient.csproj deleted file mode 100644 index 4d9483c..0000000 --- a/Samples/XNA sample/XnaGameClient/XnaGameClient.csproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - {D084E1C2-CE6B-42A5-918E-37EC7D2B5132} - {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - x86 - WinExe - Properties - XnaGameClient - XnaGameClient - v4.0 - v4.0 - Windows - e7198d36-15ad-4289-ac23-fa03d866c3e5 - Game.ico - GameThumbnail.png - false - - - Game - HiDef - Client - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - - - true - full - false - bin\x86\Debug - DEBUG;TRACE;WINDOWS - prompt - 4 - true - false - x86 - false - - - pdbonly - true - bin\x86\Release - TRACE;WINDOWS - prompt - 4 - true - false - x86 - True - - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - - - - - - - - - - - - 416f5a82-22d8-4a94-bc19-4c6a24f34a73 - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - true - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - False - Microsoft XNA Framework Redistributable 3.1 - true - - - False - Microsoft XNA Framework Redistributable 4.0 - true - - - - - {FA245447-5F23-4AA1-BD5F-8D2DDF33CFBD} - Lidgren.Network - - - {416F5A82-22D8-4A94-BC19-4C6A24F34A73} - XnaGameClientContent %28Content%29 - Content - - - - - - \ No newline at end of file diff --git a/Samples/XNA sample/XnaGameClient/XnaGameClient.csproj.Debug.cachefile b/Samples/XNA sample/XnaGameClient/XnaGameClient.csproj.Debug.cachefile deleted file mode 100644 index c525e45..0000000 --- a/Samples/XNA sample/XnaGameClient/XnaGameClient.csproj.Debug.cachefile +++ /dev/null @@ -1,5 +0,0 @@ -Content\c1.xnb -Content\c2.xnb -Content\c3.xnb -Content\c4.xnb -Content\c5.xnb diff --git a/Samples/XNA sample/XnaGameClient/XnaGameClient.csproj.user b/Samples/XNA sample/XnaGameClient/XnaGameClient.csproj.user deleted file mode 100644 index 35ff511..0000000 --- a/Samples/XNA sample/XnaGameClient/XnaGameClient.csproj.user +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - en-US - false - - - \ No newline at end of file diff --git a/Samples/XNA sample/XnaGameServer/Program.cs b/Samples/XNA sample/XnaGameServer/Program.cs deleted file mode 100644 index 91bc1a5..0000000 --- a/Samples/XNA sample/XnaGameServer/Program.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System; -using System.Threading; - -using Lidgren.Network; - -namespace XnaGameServer -{ - class Program - { - static void Main(string[] args) - { - NetPeerConfiguration config = new NetPeerConfiguration("xnaapp"); - config.EnableMessageType(NetIncomingMessageType.DiscoveryRequest); - config.Port = 14242; - - // create and start server - NetServer server = new NetServer(config); - server.Start(); - - // schedule initial sending of position updates - double nextSendUpdates = NetTime.Now; - - // run until escape is pressed - while (!Console.KeyAvailable || Console.ReadKey().Key != ConsoleKey.Escape) - { - NetIncomingMessage msg; - while ((msg = server.ReadMessage()) != null) - { - switch (msg.MessageType) - { - case NetIncomingMessageType.DiscoveryRequest: - // - // Server received a discovery request from a client; send a discovery response (with no extra data attached) - // - server.SendDiscoveryResponse(null, msg.SenderEndpoint); - break; - case NetIncomingMessageType.VerboseDebugMessage: - case NetIncomingMessageType.DebugMessage: - case NetIncomingMessageType.WarningMessage: - case NetIncomingMessageType.ErrorMessage: - // - // Just print diagnostic messages to console - // - Console.WriteLine(msg.ReadString()); - break; - case NetIncomingMessageType.StatusChanged: - NetConnectionStatus status = (NetConnectionStatus)msg.ReadByte(); - if (status == NetConnectionStatus.Connected) - { - // - // A new player just connected! - // - Console.WriteLine(NetUtility.ToHexString(msg.SenderConnection.RemoteUniqueIdentifier) + " connected!"); - - // randomize his position and store in connection tag - msg.SenderConnection.Tag = new int[] { - NetRandom.Instance.Next(10, 100), - NetRandom.Instance.Next(10, 100) - }; - } - - break; - case NetIncomingMessageType.Data: - // - // The client sent input to the server - // - int xinput = msg.ReadInt32(); - int yinput = msg.ReadInt32(); - - int[] pos = msg.SenderConnection.Tag as int[]; - - // fancy movement logic goes here; we just append input to position - pos[0] += xinput; - pos[1] += yinput; - break; - } - - // - // send position updates 30 times per second - // - double now = NetTime.Now; - if (now > nextSendUpdates) - { - // Yes, it's time to send position updates - - // for each player... - foreach (NetConnection player in server.Connections) - { - // ... send information about every other player (actually including self) - foreach (NetConnection otherPlayer in server.Connections) - { - // send position update about 'otherPlayer' to 'player' - NetOutgoingMessage om = server.CreateMessage(); - - // write who this position is for - om.Write(otherPlayer.RemoteUniqueIdentifier); - - if (otherPlayer.Tag == null) - otherPlayer.Tag = new int[2]; - - int[] pos = otherPlayer.Tag as int[]; - om.Write(pos[0]); - om.Write(pos[1]); - - // send message - server.SendMessage(om, player, NetDeliveryMethod.Unreliable); - } - } - - // schedule next update - nextSendUpdates += (1.0 / 30.0); - } - } - - // sleep to allow other processes to run smoothly - Thread.Sleep(1); - } - - server.Shutdown("app exiting"); - } - } -} diff --git a/Samples/XNA sample/XnaGameServer/Properties/AssemblyInfo.cs b/Samples/XNA sample/XnaGameServer/Properties/AssemblyInfo.cs deleted file mode 100644 index 91a41d2..0000000 --- a/Samples/XNA sample/XnaGameServer/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("XnaGameServer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("XnaGameServer")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("ad24f34e-32a4-4619-a19f-c16f126d186e")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/XNA sample/XnaGameServer/XnaGameServer.csproj b/Samples/XNA sample/XnaGameServer/XnaGameServer.csproj deleted file mode 100644 index 747ece2..0000000 --- a/Samples/XNA sample/XnaGameServer/XnaGameServer.csproj +++ /dev/null @@ -1,64 +0,0 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {2A16EEC3-99B7-45D8-B185-6E1101225540} - Exe - Properties - XnaGameServer - XnaGameServer - v4.0 - 512 - - - - - 3.5 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - - - - - - - - - {FA245447-5F23-4AA1-BD5F-8D2DDF33CFBD} - Lidgren.Network - - - - - \ No newline at end of file