C# 游戏网络库

C# Game Network Library(C# 游戏网络库)

本文介绍了C# 游戏网络库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 .Net v2 开发在线策略游戏.虽然游戏主要是战略性的,但它确实有一些需要合理网络性能的战术元素.我计划将 TCP 数据包用于战略数据,将 UDP 数据包用于战术数据.

{EDIT} 我忘了提到我放弃 WCF 和 .NET 3+ 的原因有几个.首先,因为我想让我的下载量很小,而且我的大多数客户已经拥有 .NET 2.0.其次,因为我想选择移植到 Mac 和 Linux,并且不确定 Mono 中的 WCF 可用性.{/编辑}

我正在寻找网络库推荐.我找到了一些选项,例如 GarageGames 的 Torque Network Library (C++)、RakNet (C++) 和 lidgren 网络库 (C#):

http://www.opentnl.org/http://www.jenkinssoftware.com/http://code.google.com/p/lidgren-network/

是否有人对这些库或其他库有实际经验?

<小时>

我刚刚偶然发现了 RakNetDotNet:

http://code.google.com/p/raknetdotnet/p>

可能就是我要找的……

解决方案

为什么要限制自己使用 .NET 2.0..NET 3.0(或 3.5)包含 WCF,是一个可靠的高性能通信子系统,具有良好的安全性..NET 3.0 只是带有附加库(WCF、WF、WPF)的 .NET 2.0.

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.

{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}

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#):

http://www.opentnl.org/ http://www.jenkinssoftware.com/ http://code.google.com/p/lidgren-network/

Does anyone have real-world experience with these or other libraries?


I just stumbled on RakNetDotNet:

http://code.google.com/p/raknetdotnet/

This might be what I'm looking for...

解决方案

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).

这篇关于C# 游戏网络库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:C# 游戏网络库

基础教程推荐