소스 검색

Moving MPSGamelift documentation to the MPSGameLIft gem. Updating the MPS readme to point to the new doc location

Signed-off-by: Gene Walters <[email protected]>
Gene Walters 2 년 전
부모
커밋
a11e0c5e6d

+ 40 - 8
Documentation/Hosting/AmazonGameLift/GameLift.md → MPSGameLift/Documentation/GameLift.md

@@ -1,13 +1,32 @@
 # MultiplayerSample Project with Amazon GameLift
 
-This README covers testing and running MultiplayerSample with Amazon GameLift.
+This README covers optional setup, testing and running on [Amazon GameLift](https://aws.amazon.com/gamelift/), an AWS service to make hosting and scaling game servers easier. 
 
 ## Running with [Amazon GameLift](https://docs.aws.amazon.com/gamelift/index.html)
 
 ### Setup
 1. Install the [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html), if you don't already have it. You will need it to interact with Amazon GameLift.
-1. Enable the "AWSGameLift" and "MPSGameLift" gem by adding them to MultiplayerSample/Gem/Code/enabled_gems.cmake
-1. Build the server, game launchers, and asset bundler for MultiplayerSample as normal, per [top-level README](/README.md).
+
+    a. Confirm installation by running `aws --version`
+    ```sh
+    C:\> aws --version
+    aws-cli/2.10.0 Python/3.11.2 Windows/10 exe/AMD64 prompt/off
+    ```
+1. Enable the "AWSGameLift" and "MPSGameLift" gems
+
+    Option 1: Commandline
+    ```sh
+    <path-to-o3de-engine>\scripts\o3de.bat enable-gem -pp <path-to-multiplayer-sample> -gn MPSGameLift
+    ```
+    Option 2: Project Manager
+    1. Open Project Manager
+    2. Select the "Configure Gems" options for Multiplayer Sample
+    3. Enable "AWSGameLift" and "MPSGameLift" gems
+
+        ![Enable GameLift Gems](Media/enable_gamelift_gems.jpg)
+    4. Click "Save"
+
+1. Build the server, game launchers, and asset bundler for MultiplayerSample
     ```sh
     cmake --build build\windows --target Editor MultiplayerSample.GameLauncher MultiplayerSample.ServerLauncher AssetBundler --config profile -- /m /nologo
     ```
@@ -16,17 +35,21 @@ This README covers testing and running MultiplayerSample with Amazon GameLift.
     cmake --build build\windows --target MultiplayerSample.Assets --config profile -- /m /nologo
     ```
 1. Work in progress (WiP) step: Add your AWS region to Config/default_aws_resource_mappings.json (example: "Region": "us-west-2")
-    a. Currently needed otherwise when the client initializes GameLift there will be an error about not having a region. 
+
+    a. Currently needed otherwise when the client initializes GameLift there will be an error about not having a region.
+
     b. This step will be removed once we properly parse the game-session data which contains the fleet-id, region-id, etc  
 
-## Build Server for Windows (WiP)
-1. WiP Step: Build a profile pak server/game build
-    a. This step should be replaced by building a proper release build
+## Build Server for Windows
 1. Build Monolithic Server
+
     a. cmake -B build\windows_mono -S . -G "Visual Studio 16" -DLY_MONOLITHIC_GAME=1 -DALLOW_SETTINGS_REGISTRY_DEVELOPMENT_OVERRIDES=0
-    b. cmake --build build\windows_mono --target MultiplayerSample.GameLauncher MultiplayerSample.ServerLauncher MultiplayerSample.UnifiedLauncher --config profile -- /m /nologo
+
+    b. cmake --build build\windows_mono --target MultiplayerSample.GameLauncher MultiplayerSample.ServerLauncher --config profile -- /m /nologo
 1. Bundle Content
+
     a. Open .\build\windows\bin\profile\AssetBundler.exe
+
     b. Follow steps for "Create a bundle for game assets" and "Create a bundle for engine assets" and "Add bundles to the release game layout" here: https://www.o3de.org/docs/user-guide/packaging/asset-bundler/bundle-assets-for-release/
 
 The "default seed lists" choice should choose all but 4 seed lists to make the engine_pc.pak
@@ -34,6 +57,7 @@ The other 4 seed lists should all get selected to make the game_pc.pak
 It's important to make sure that the bootstrap.game.profile.setreg file has been added to one of the seed files. (also add debug if you want to support debug builds)
 1. Create the Launcher Zip file
    Use the following .bat file or equivalent copy steps to create a directory with the launchers in it:
+   Run from MultiplayerSample project root directory...
    ```sh
     rem Use this by calling 'make_release C:\GameLiftPackageWindows' to make a release directory
     mkdir %1
@@ -50,7 +74,9 @@ It's important to make sure that the bootstrap.game.profile.setreg file has been
     
     rem Copy the AWSCore files
     copy .\build\windows_mono\bin\profile\Gems\AWSCore\*.* %1\Gems\AWSCore
+    ```
 1. Test the profile pak server and game locally
+    Run the server in headless mode using `rhi=null` and `NullRenderer` parameters; the server appears as a white screen in headless mode.
     ```sh
     C:\GameLiftPackageWindows\MultiplayerSample.ServerLauncher.exe --rhi=null -NullRenderer -bg_ConnectToAssetProcessor=0 -sys_PakPriority=2 -sv_terminateOnPlayerExit=true --console-command-file=launch_server.cfg
     ```
@@ -80,6 +106,12 @@ After running this command it'll take about an hour for the fleet to activate. C
 `
 aws gamelift create-fleet --region us-west-2 --name GameLiftO3DTest2016 --ec2-instance-type c5.large --fleet-type ON_DEMAND --build-id <BuildId> --runtime-configuration "GameSessionActivationTimeoutSeconds=300, MaxConcurrentGameSessionActivations=2, ServerProcesses=[{LaunchPath=C:\game\MultiplayerSample.ServerLauncher.exe, Parameters= --rhi=null -sys_PakPriority=2 -NullRenderer -sv_terminateOnPlayerExit=true -bg_ConnectToAssetProcessor=0 --sv_gameLiftEnabled=true --sv_dedicated_host_onstartup=false --console-command-file=launch_server.cfg, ConcurrentExecutions=1}]" --ec2-inbound-permissions "FromPort=33450,ToPort=34449,IpRange=0.0.0.0/0,Protocol=UDP"
 `
+---
+**NOTE**
+
+The ec2-instance-type and fleet-type determines the kind of AWS resources used; your AWS account may incur costs.
+
+---
 
 Record the FleetId for the next step. Example: fleet-1a49fc3e-892a-40fc-b2e9-aa7e11983182
 

+ 1 - 1
Documentation/Hosting/AmazonGameLift/GameLiftLocal.md → MPSGameLift/Documentation/GameLiftLocal.md

@@ -29,7 +29,7 @@ This README covers testing and running MultiplayerSample with Amazon GameLift Lo
     sv_gameLiftEnabled: Causes the GameLift gem connect to GameLift on app startup
     sv_dedicated_host_onstartup: Stops the Multiplayer Gem from automatically hosting on startup and instead wait for GameLift to tell the server when it's okay to begin hosting (and which port to listen in on for connections) 
 
-Note: You may be inclined to move these cvars into a cfg file and start the server by passing the --console-command-file parameter, but don't. Some cvars are used during a system component Activate(), but the console-command-file is executed after all system components have been activated.
+Note: You may be inclined to move these [cvars](https://www.o3de.org/docs/user-guide/appendix/cvars/) into a cfg file and start the server by passing the --console-command-file parameter, but don't. Some cvars are used during a system component Activate(), but the console-command-file is executed after all system components have been activated.
 For example, sv_gameLiftEnabled is used inside AWSGameLiftServerSystemComponent::Activate().
 
 1. Create a game session with the below command:

+ 3 - 0
MPSGameLift/Documentation/Media/enable_gamelift_gems.jpg

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d1afd21f0c7e81f227e76ec9b15e03f8157a556d489798d5099e6f781fd2ddc9
+size 49600

+ 15 - 0
MPSGameLift/README.md

@@ -0,0 +1,15 @@
+# MultiplayerSample GameLift Integration Gem
+
+Enable this gem for MultiplayerSample in order to enable AWS GameLift integration.
+
+## Setup Instructions
+
+| Link                                                      | Description                                |
+|-----------------------------------------------------------|--------------------------------------------|
+| [GameLift Setup](Documentation/GameLift.md)               | How to build server and deploy to GameLift |
+| [GameLift Local Setup](Documentation/GameLiftLocal.md)    | How to test GameLift locally               |
+
+
+## License
+
+For terms please see the LICENSE*.TXT files included in the root of this distribution.

+ 1 - 2
README.md

@@ -326,8 +326,7 @@ You can contribute by [reporting issues and making feature requests](https://git
 | [Gameplay Configuration](Documentation/GamplayConfiguration.md)                  | How to adjust gameplay settings                                           |
 | [SettingsScreen](Documentation/SettingsScreen.md)                                | How to use and extend the settings screen                                 |
 | [Packaging MPS](Documentation/PackedAssetBuilds.md)                              | How to build and package MPS for distribution or running servers remotely |
-| [GameLift Setup](Documentation/Hosting/AmazonGameLift/GameLift.md)               | How to deploy to GameLift                                                 |
-| [GameLift Local Setup](Documentation/Hosting/AmazonGameLift/GameLiftLocal.md)    | How to test GameLift locally                                              |
+| [GameLift Setup](MPSGameLift/README.md)                                          | How to enable AWS GameLift integration                                    |
 
 ## O3DE Useful Links