<p>I am developing an online strategy game using .Net v2. Although the game is primarily strategic, it does have some tactical elements that require reasonable network performance. I plan to use TCP packets for strategic data and UDP packets for tactical data. </p>

<p>{EDIT} I forgot to mention that I am leaning away from WCF and .NET 3+ for a couple of reasons. First, because I want to keep my download small and most of my customers already have .NET 2.0. Second, because I would like to have the option of porting to Mac and Linux and am unsure of WCF availability in Mono. {/EDIT}</p>

<p>I am looking for network library recommendations. I have found a few options, such as GarageGames' Torque Network Library (C++), RakNet (C++), and the lidgren network library (C#):</p>

<p><a href="http://www.opentnl.org/" rel="nofollow noreferrer">http://www.opentnl.org/</a>
<a href="http://www.jenkinssoftware.com/" rel="nofollow noreferrer">http://www.jenkinssoftware.com/</a>
<a href="http://code.google.com/p/lidgren-network/" rel="nofollow noreferrer">http://code.google.com/p/lidgren-network/</a></p>

<p>Does anyone have real-world experience with these or other libraries?</p>

<hr>

<p>I just stumbled on RakNetDotNet:</p>

<p><a href="http://code.google.com/p/raknetdotnet/" rel="nofollow noreferrer">http://code.google.com/p/raknetdotnet/</a></p>

<p>This <em>might</em> be what I'm looking for...</p>

[{'answer_id': 46884, 'author': 'Simon Gillbee', 'author_id': 756, 'author_profile': 'https://Stackoverflow.com/users/756', 'pm_score': 2, 'selected': True, 'text': '<p>Why limit yourself to .NET 2.0. .NET 3.0 (or 3.5) contains WCF and is a solid, performant communications subsystem with good security. .NET 3.0 is just .NET 2.0 with additional libraries (WCF, WF, WPF).</p>\n'}, {'answer_id': 46900, 'author': 'Mark Cidade', 'author_id': 1659, 'author_profile': 'https://Stackoverflow.com/users/1659', 'pm_score': 3, 'selected': False, 'text': '<p>Microsoft\'s own .NET based <a href="http://creators.xna.com/" rel="noreferrer">XNA</a> allows you to create networked games on Windows and XBox 360.</p>\n'}, {'answer_id': 74351, 'author': 'Joel Martinez', 'author_id': 5416, 'author_profile': 'https://Stackoverflow.com/users/5416', 'pm_score': 2, 'selected': False, 'text': '<p>I\'d also like to note that "Games for Windows", which XNA uses on windows with its Live! networking APIs is now free ... which means that if you write an XNA game that uses the networking features, your users <strong>do not</strong> have to have a gold membership :-)</p>\n\n<p><a href="http://www.engadget.com/2008/07/22/games-for-windows-live-now-free/" rel="nofollow noreferrer">http://www.engadget.com/2008/07/22/games-for-windows-live-now-free/</a></p>\n'}, {'answer_id': 74398, 'author': 'DesertShadow', 'author_id': 13032, 'author_profile': 'https://Stackoverflow.com/users/13032', 'pm_score': 0, 'selected': False, 'text': "<p>If you're new to game development, I'd recommend XNA- it's easy to program with. The advantage of Torque, however, is it has asset creation tools, which can also be invaluable. For a higher end game or FPS, the Source engine is great.</p>\n"}, {'answer_id': 441852, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>You could take a look at Entanglar ( <a href="http://entanglar.dunnchurchill.com" rel="nofollow noreferrer">http://entanglar.dunnchurchill.com</a> ) if you are looking for something higher level. Entanglar provides full entity lifecycle and sync.</p>\n'}, {'answer_id': 5937461, 'author': 'Tarnschaf', 'author_id': 50777, 'author_profile': 'https://Stackoverflow.com/users/50777', 'pm_score': 1, 'selected': False, 'text': '<p>Although this question is rather old, a somewhat higher level system developed specifically for games is <a href="http://www.aplaypowered.com" rel="nofollow">APlay</a> - among the supported platforms is also C#. There are evaluation versions and it is free for personal use.</p>\n\n<p>You define your game objects in an UML alike fashion and an online code generator creates assemblies containing your game objects. Sending state updates is then as simple as calling setter methods.</p>\n\n<p>Not the right thing, if you want to cope with sockets by yourself. Please also note that I am a developer of APlay so this is a biased answer.</p>\n'}, {'answer_id': 8372104, 'author': 'Dan', 'author_id': 62104, 'author_profile': 'https://Stackoverflow.com/users/62104', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://code.google.com/p/lidgren-network-gen3/" rel="nofollow">http://code.google.com/p/lidgren-network-gen3/</a></p>\n\n<blockquote>\n  <p>Lidgren.Network is a networking library for .net framework which uses\n  a single udp socket to deliver a simple API for connecting a client to\n  a server, reading and sending messages.</p>\n</blockquote>\n'}, {'answer_id': 8873730, 'author': 'Watusimoto', 'author_id': 103252, 'author_profile': 'https://Stackoverflow.com/users/103252', 'pm_score': 1, 'selected': False, 'text': "<p>An ancient question, but I'll put this out there for anyone else who stumbles across this.  We're using OpenTNL for our game, Bitfighter, and I am consistently surprised at how well it works.  And it's free if you can live with GPL.</p>\n"}]
['https://Stackoverflow.com/questions/46855', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4589/']