为什么大多数电脑游戏都不超过16v16?
从编程/网络的角度来看,为什么很少/没有比16v16更大规模的比赛?
有一些 32v32 游戏,但这些似乎是规则的例外。
From a programming/network point of view, what are the reasons why there are very few/no larger scale games than 16v16?
There are some 32v32 games but these are seeming exceptions to the rule.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很简单,扩展是困难的和/或昂贵的,并且 O(n^3) 通常是一个白日梦。对于 2v2 游戏和简单的通信算法,您需要每台计算机与 ((2*2)-1) = 3 台其他计算机通信(不包括某种连接中介服务器),这就是 ((2* 2)!/2) = 总共 12 个连接;同样,对于 n 个玩家与 n 个玩家,每台计算机需要与 ((n*n)-1) 台计算机通信,总共需要 (n!/2) 个连接。
这很快就会变得荒谬,并且需要其他方法,例如“所有玩家都与中央服务器通信,中央服务器为他们提供更新”。这稍微更具可扩展性,但仅限于一定程度。计算 64 个玩家的状态并与他们通信(并保持游戏状态同步,即使是短暂的断开连接!)并不简单,特别是对于延迟很重要的游戏(例如 FPS)。
拥有专门为此定制的大型服务器场(带有通往网络的巨大管道)会有所帮助,但它很昂贵(这是您的《魔兽世界》订阅的很大一部分);如果其中一台玩家的计算机正在执行这项工作,则由于处理能力、带宽和延迟的缺乏,延迟将变得更加明显。
Quite simply, scaling is hard and/or expensive, and O(n^3) is usually a pipe dream. For a game of 2v2, and a naive communication algorithm, you need each computer to communicate with ((2*2)-1) = 3 other computers (not counting some sort of connection mediation server), which comes to ((2*2)!/2) = 12 connections altogether ; likewise, for n versus n players, each computer needs to communicate with ((n*n)-1) computers, which comes to (n!/2) connections altogether.
That becomes ridiculous rather quickly, and other approaches are needed, such as "all players communicate with a central server, which provides them with updates". That is slightly more scalable, but only up to a point. Calculating state for 64 players and communicating with them (and keeping the game state synchronized, even through short disconnections!) isn't exactly simple, especially for games where latency matters (e.g. FPS).
Having massive server farms (with huge pipes to the net) which are dedicated and customized for this, can help, but it's expensive (that's a large part of your WoW subscription); if one of the players' computers is doing this work, lags will become drastically more apparent - both for lack of processing power, bandwith, and latency.
我猜你说的主要是第一人称射击游戏,因为 MMO 游戏支持超过 32 名玩家同时在线。
从编程/网络的角度来看,大多数电脑游戏没有理由不超过 16v16。普通服务器可以毫无问题地处理负载,并且带宽也不会成为问题。
确实是游戏问题。超过 32 名玩家的游戏比其他任何游戏都更加混乱。
I presume you are talking about mostly first person shooter game, as MMO game supports more than 32 players online at the same time.
From a programming/network point of view, there are no reason that most computer games are no more that 16vs16. A common server can handle the load without problem, and bandwidth wouldn't be a problem.
It's really a game issue. Game that have more than 32 players is more chaotic that nothing else.