# 游戏服务器

游戏服务器是一种计算机程序，或运行该程序的机器，用于承载多人游戏会话：它运行游戏模拟，接收已连接玩家的输入，并将生成的游戏状态分发给每一位参与者。在主流的客户端-服务器模型中，服务器持有权威游戏状态，即其对事件的版本才是最终依据，而每位玩家的客户端则维护该状态的一个接近的近似副本。<sup>[1](https://dev.epicgames.com/documentation/unreal-engine/setting-up-dedicated-servers-in-unreal-engine)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心角色 | 运行游戏模拟并持有权威游戏状态；客户端发送输入并接收复制的状态更新<sup>[1](https://dev.epicgames.com/documentation/unreal-engine/setting-up-dedicated-servers-in-unreal-engine)</sup> |
| 专用与监听 | 专用服务器以无头模式运行，没有本地玩家；监听服务器是玩家自己的机器同时充当客户端和主机<sup>[1](https://dev.epicgames.com/documentation/unreal-engine/setting-up-dedicated-servers-in-unreal-engine)</sup> |
| 公平性 | 在监听服务器上，主持玩家在真实的游戏状态中进行游戏，相对于连接的客户端具有优势；专用服务器则为所有玩家提供相同类型的连接<sup>[1](https://dev.epicgames.com/documentation/unreal-engine/setting-up-dedicated-servers-in-unreal-engine)</sup><sup> • </sup><sup>[2](https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview?application_version=4.27)</sup> |
| 典型用途 | 专用服务器是大型多人在线游戏、竞技类多人在线战术竞技游戏和快节奏在线射击游戏的首选<sup>[2](https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview?application_version=4.27)</sup> |
| 云托管 | Amazon GameLift Servers 等托管服务为基于会话的多人游戏部署、运营和扩展专用云服务器<sup>[3](https://docs.aws.amazon.com/gameliftservers/latest/developerguide/)</sup> |
| 市场规模 | Omdia 对云平台游戏技术生态系统的估值为 129 亿美元，涵盖游戏服务器、后端工具、分析和 LiveOps，预计到 2029 年将达到约 209 亿美元<sup>[4](https://omdia.tech.informa.com/pr/2025/jul/omdia-cloud-platforms-drive-12point9bn-dollars-games-market-ecosystem)</sup> |

## 游戏服务器的工作原理

在客户端-服务器多人游戏中，一台机器充当服务器并承载会话，而其他每位玩家的计算机则作为客户端连接到它。服务器处理游戏玩法，并与每个连接的客户端共享游戏状态信息，客户端利用这些信息模拟出与服务器上实际情况十分接近的状态。服务器并不直接向客户端显示器流式传输画面；它复制关于存在哪些角色、它们如何行动以及它们的变量持有什么值的信息。<sup>[2](https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview?application_version=4.27)</sup>

**权威与纠正。** 由于延迟意味着每位玩家看到的世界略有不同，必须有某种机制来决定哪个版本是真实的。在权威服务器模型中，服务器的模拟被认为是正确的，当出现分歧时可以否决客户端的游戏状态；发现与服务器状态存在差异的客户端必须纠正其本地副本。<sup>[5](https://www.theseus.fi/bitstream/10024/906524/2/Gestrin_Christian.pdf)</sup><sup> • </sup><sup>[6](https://www.theseus.fi/bitstream/10024/857074/2/Aaltonen_Eetu.pdf)</sup> 客户端可以为了响应性而更新自己对游戏状态的本地视图，但在必要时必须接受服务器权威版本的纠正。<sup>[7](https://docs.unity.cn/430/Documentation/Components/net-HighLevelOverview.html)</sup>

**复制。** 服务器有选择地向每个客户端发送信息以再现游戏状态，这一过程称为复制。开发者选择复制什么以及如何复制，在全体玩家体验的一致性需求与最小化带宽的需求之间取得平衡。常见机制包括自动创建和销毁角色的远程副本、移动和变量复制，以及远程过程调用——即传输到特定机器（如服务器或所属客户端）上运行的函数。<sup>[2](https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview?application_version=4.27)</sup>

## 专用服务器与监听服务器

**专用服务器。** 专用服务器是游戏的一个实例，仅作为服务器运行，其上没有本地游玩的客户端。<sup>[8](https://docs.unity.cn/2017.4/Documentation/Manual/UNetConcepts.html)</sup> 它以无头模式运行：不渲染画面，没有人在其上直接游玩，因此每位玩家都以远程客户端的身份连接进来。<sup>[1](https://dev.epicgames.com/documentation/unreal-engine/setting-up-dedicated-servers-in-unreal-engine)</sup> 由于它舍弃了图形、声音、输入和其他面向玩家的功能，因此可以更高效地处理游戏玩法和网络通信。<sup>[2](https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview?application_version=4.27)</sup> 专用构建通常是游戏的命令行版本，仅支持管理服务器所需的输入和输出功能。<sup>[5](https://www.theseus.fi/bitstream/10024/906524/2/Gestrin_Christian.pdf)</sup> 代价是需要一台独立的计算机及其自己的网络连接，且配置更为困难。<sup>[2](https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview?application_version=4.27)</sup>

**监听服务器。** 监听服务器与玩家的客户端运行在同一个游戏实例中：主持玩家的机器充当服务器，其他客户端连接到它。<sup>[9](https://docs-multiplayer.unity3d.com/netcode/2.2.0/terms-concepts/client-server/)</sup> 任何拥有游戏副本的用户都可以自发启动一个监听服务器，这使得监听服务器对于休闲合作和小规模多人游戏非常方便。然而，主持玩家直接在真实的游戏状态中游玩，因此相对于通过网络连接的客户端具有优势，这引发了公平性和作弊方面的担忧，而且该机器还承担着服务器和玩家相关系统的额外处理负载。<sup>[2](https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview?application_version=4.27)</sup>

**在两者之间选择。** 专用服务器适合需要持久性、安全性、公平性或支持大量玩家的游戏，而监听服务器对于休闲多人游戏和合作游玩通常是可以接受的。<sup>[2](https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview?application_version=4.27)</sup><sup> • </sup><sup>[1](https://dev.epicgames.com/documentation/unreal-engine/setting-up-dedicated-servers-in-unreal-engine)</sup> 与点对点网络（玩家之间直接通信，没有中心主机）相比，专用权威服务器以更高的基础设施成本换取最强的防作弊保护；点对点对于小型、低风险会话来说最便宜、延迟最低，但防作弊能力最弱。<sup>[10](https://heroiclabs.com/blog/which-multiplayer-architecture-live-game/)</sup>

## 托管与运营

工作室可以在自己的机器上或云端运行游戏服务器。例如，Amazon GameLift Servers 在 AWS 基础设施上为基于会话的多人游戏部署、运营和扩展专用的低成本服务器，其机群遍布 AWS 区域和本地区域，放置队列将玩家放入延迟最优的会话，基于目标的自动扩缩容则根据玩家需求调整容量。<sup>[3](https://docs.aws.amazon.com/gameliftservers/latest/developerguide/)</sup><sup> • </sup><sup>[11](https://docs.aws.amazon.com/gameliftservers/latest/developerguide/gamelift-howitworks.html)</sup> 托管机群存储上传的游戏服务器构建并将其部署到机群实例。<sup>[11](https://docs.aws.amazon.com/gameliftservers/latest/developerguide/gamelift-howitworks.html)</sup> Omdia 的 2025 年分析将 AWS、Google Cloud、Microsoft Azure 和[腾讯云](https://www.edgepedia.org/zh/tencent-cloud)列为游戏云平台的市场领导者，[阿里云](https://www.edgepedia.org/zh/alibaba-cloud)在亚洲是强有力的挑战者，而 i3D.net 和 servers.com 等专业裸金属提供商则被用于混合策略。<sup>[4](https://omdia.tech.informa.com/pr/2025/jul/omdia-cloud-platforms-drive-12point9bn-dollars-games-market-ecosystem)</sup>

**社区服务器。** 一些发行商直接向玩家分发服务器软件。Mojang 以 Java 文件形式发布《[我的世界](https://www.edgepedia.org/zh/minecraft)》专用服务器并提供运行说明，Valve 则分发 SteamCMD 和数百款游戏的专用服务器工具，让玩家运行自己的对局服务器。<sup>[12](https://www.tomshardware.com/video-games/pc-gaming/esa-tells-california-lawmakers-that-private-game-servers-are-piracy)</sup> 社区托管也已成为一个保存问题：当工作室 Sweet Bandits 关闭时，它重建了《Deceive Inc.》的后端以支持社区托管的专用服务器，使游戏能够比其官方服务存续更久，<sup>[13](https://www.pcgamer.com/games/fps/closed-game-studio-returns-to-un-live-service-its-game-with-community-servers-before-shutdown-we-dont-believe-deceive-inc-should-quietly-disappear/)</sup> 而《[侠盗猎车手V](https://www.edgepedia.org/zh/grand-theft-auto-v)》的粉丝平台如 FiveM（其 Cfx.re 团队于 2023 年被 Rockstar 收购）则让玩家运行带有自己游戏模式的自定义专用服务器。<sup>[14](https://www.gamesradar.com/games/grand-theft-auto/after-9-years-of-work-team-behind-gta-5-multiplayer-mod-that-rivalled-rockstar-owned-fivem-says-take-two-is-shutting-the-project-down-thank-you-for-being-part-of-this-journey/)</sup>

## 延迟与响应性

为了在往返延迟的情况下保持控制响应性，客户端在本地预测自己输入的结果，并在服务器的权威更新到达时进行协调，将服务器位置与预测位置进行比较并按需纠正。<sup>[15](https://architecturediagram.ai/blog/game-server-architecture)</sup> 回滚网络代码采用相关方法，在客户端的游戏状态上立即执行和渲染玩家动作，随后将其整合到服务器对应刻度的模拟中。<sup>[16](https://drops.dagstuhl.de/storage/00lipics/lipics-vol361-opodis2025/html/LIPIcs.OPODIS.2025.11/LIPIcs.OPODIS.2025.11.html)</sup>

## References

1. [Setting Up Dedicated Servers in Unreal Engine, Epic Developer Community](https://dev.epicgames.com/documentation/unreal-engine/setting-up-dedicated-servers-in-unreal-engine)
2. [Networking Overview, Unreal Engine 4.27 Documentation, Epic Developer Community](https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview?application_version=4.27)
3. [What is Amazon GameLift Servers?, AWS Documentation](https://docs.aws.amazon.com/gameliftservers/latest/developerguide/)
4. [Omdia: Cloud platforms drive $12.9bn games market ecosystem](https://omdia.tech.informa.com/pr/2025/jul/omdia-cloud-platforms-drive-12point9bn-dollars-games-market-ecosystem)
5. [Gestrin, Christian. Game Server Infrastructure, Theseus thesis](https://www.theseus.fi/bitstream/10024/906524/2/Gestrin_Christian.pdf)
6. [Aaltonen, Eetu. Dedicated server, Theseus thesis](https://www.theseus.fi/bitstream/10024/857074/2/Aaltonen_Eetu.pdf)
7. [Unity, High Level Networking Concepts](https://docs.unity.cn/430/Documentation/Components/net-HighLevelOverview.html)
8. [Unity, Networking HLAPI System Concepts](https://docs.unity.cn/2017.4/Documentation/Manual/UNetConcepts.html)
9. [Client-server topologies, Unity Multiplayer](https://docs-multiplayer.unity3d.com/netcode/2.2.0/terms-concepts/client-server/)
10. [Which Multiplayer Architecture Fits a Live Game?, Heroic Labs](https://heroiclabs.com/blog/which-multiplayer-architecture-live-game/)
11. [How hosting with Amazon GameLift Servers works, AWS Documentation](https://docs.aws.amazon.com/gameliftservers/latest/developerguide/gamelift-howitworks.html)
12. [Private and community servers for Minecraft and COD are illegal and amount to piracy, ESA tells California Senate, Tom's Hardware](https://www.tomshardware.com/video-games/pc-gaming/esa-tells-california-lawmakers-that-private-game-servers-are-piracy)
13. [Closed game studio returns to un-live service its game with community servers before shutdown, PC Gamer](https://www.pcgamer.com/games/fps/closed-game-studio-returns-to-un-live-service-its-game-with-community-servers-before-shutdown-we-dont-believe-deceive-inc-should-quietly-disappear/)
14. [After 9 years of work, team behind GTA 5 multiplayer mod says Take-Two is shutting the project down, GamesRadar](https://www.gamesradar.com/games/grand-theft-auto/after-9-years-of-work-team-behind-gta-5-multiplayer-mod-that-rivalled-rockstar-owned-fivem-says-take-two-is-shutting-the-project-down-thank-you-for-being-part-of-this-journey/)
15. [Game Server Architecture: Multiplayer, Real-Time, and Dedicated Servers Explained, ArchitectureDiagram.ai](https://architecturediagram.ai/blog/game-server-architecture)
16. [Formalizing Rollback Netcodes for Robust and Real-Time Client-Server Architectures, OPODIS 2025](https://drops.dagstuhl.de/storage/00lipics/lipics-vol361-opodis2025/html/LIPIcs.OPODIS.2025.11/LIPIcs.OPODIS.2025.11.html)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 21, 2026 · Edited: Oct 15, 2026; Oct 21, 2026 · Last review: Oct 21, 2026*

Topic: 体育、游戏与休闲 › 电子游戏与数字游戏 › 游戏产业 › Development and technology › Game programming

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/game-server

English original: https://www.edgepedia.org/game-server
