> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LocalMultiplayerAgent 概述

> LocalMultiplayerAgent (LMA) 概述,用于在本地测试 PlayFab Multiplayer Servers 集成,模拟 GSDK 响应,无需部署到云端。

LocalMultiplayerAgent(LMA)是一个辅助代理,通过在本地计算机上测试或运行游戏服务器来加快开发迭代速度。无需任何云连接,LMA 即可向游戏服务器 SDK(GSDK)提供模拟响应,并像在 PlayFab Multiplayer Servers(MPS)上运行一样测试你的游戏服务器。

以下是使用 LocalMultiplayerAgent 可以完成的一些示例:

* 验证 GSDK 与游戏服务器的集成。
* 测试与游戏服务器的连接
* 对游戏服务器进行诊断:每次游戏会话生成的日志和配置文件
* 验证生成配置

## 先决条件

1. 已集成 GSDK 的游戏服务器。\
   GSDK 促进游戏服务器进程与 MPS 服务之间的双向通信。若要了解如何将游戏服务器与 GSDK 集成,请参阅[这篇文章](/services/playfab/multiplayer/servers/integrating-game-servers-with-gsdk)。
   本教程使用 GitHub 上的 Wrapper 示例。Wrapper 示例包含一个虚构游戏和 GSDK。
   若要下载该示例,请参阅 [PlayFab Wrapper Sample](https://github.com/PlayFab/MpsSamples/tree/main/wrappingGsdk)。

2. LocalMultiplayerAgent (LMA) 工具集。\
   下载最新[版本](https://github.com/PlayFab/MpsAgent/releases)并将其解压到所需文件夹(例如 C:\PlayFabVmAgent)。

3. \[可选] 安装 [Docker Desktop on Windows](https://docs.docker.com/docker-for-windows/install/)。\
   LMA 可以使用 Docker for Windows 调试 Linux/Windows 容器游戏服务器。
   如果你希望以进程方式(运行可执行游戏服务器)而不是容器方式运行游戏服务器,可以跳过此部分。

## 后续步骤

* [以进程模式运行 LocalMultiplayerAgent](/services/playfab/multiplayer/servers/LocalMultiplayerAgent/run-process-based-gameserver)\
  在进程模式下,LMA 将运行可执行的游戏服务器并直接与之通信,无需设置 Docker。\
  不需要容器知识 — 你无需创建任何在容器中运行的程序。

* [以容器模式运行 LocalMultiplayerAgent](/services/playfab/multiplayer/servers/LocalMultiplayerAgent/run-container-gameserver)\
  在容器模式下,LMA 将运行并测试运行在 \[Windows/Linux] 容器中的游戏服务器。


## Related topics

- [使用 LocalMultiplayerAgent 调试容器游戏服务器](/zh-CN/services/playfab/multiplayer/servers/LocalMultiplayerAgent/run-container-gameserver.md)
- [使用 LocalMultiplayerAgent 调试基于进程的游戏服务器](/zh-CN/services/playfab/multiplayer/servers/LocalMultiplayerAgent/run-process-based-gameserver.md)
- [Wrapper 示例](/zh-CN/services/playfab/multiplayer/servers/wrapper-sample.md)
- [在本地调试游戏服务器以及与 PlayFab 的集成](/zh-CN/services/playfab/multiplayer/servers/locally-debugging-game-servers-and-integration-with-playfab.md)
- [GSDK 项目测试和调试](/zh-CN/services/playfab/multiplayer/servers/server-sdks/unreal-gsdk/third-person-mp-example-project-local-deployment-and-debugging.md)
