IN THIS ARTICLE
AWS GameLift Gem Build Packaging for Windows
This topic describes how to package your Windows dedicated server builds, which is required to install and run them on Amazon GameLift.
Creating a dedicated server package includes the following steps:
- Prepare an installation folder, and copy the assets, runtime binaries, levels, settings file(s) and redistributables.
- Create an install script to handle tasks that are required to fully install the game build onto GameLift hosting servers.
- Test the dedicated server package on your local machine.
Note:Debug dedicated servers are not supported as they require the debug Visual Studio redistributables which cannot be redistributed. See Distributable Code for Visual Studio 2019 for more details.
Prerequisites
The instructions that follow assume the following:
- You have built your project with the AWS GameLift Gem enabled. For more information on building projects, refer to Build the O3DE Project.
- You have built the profile or release version of your project’s server launcher.
- You have run the Asset Processor and compiled all of the project’s assets.
Prepare installation folder
You must create a separate installation folder to copy over the required assets, runtime binaries, registry settings files, and redistributables. In this example, the installation folder is denoted as <package base folder>
.
Profile Build
Create the required subfolders in your installation folder. The launcher looks for fixed subfolder locations to find assets and registry files, so the installation folder must have the following structure:
<package base folder>/bin
<package base folder>/assets
<package base folder>/assets/pc
Copy the following files to the
/bin
folder:- All the
*.exe
and*.dll
files fromo3de/build/windows/bin/profile
. - The
Registry
folder fromo3de/build/windows/bin/profile/Registry/
.
- All the
Copy all of the files (loose assets) in your project’s cache folder,
<project folder>/Cache/pc
, to the<package base folder>/assets/pc
folder.Download the
VC_redist.x64.exe
file and copy it to the package base folder.Create a build install script called
install.bat
in the package base folder and add the following content to the file. For more information about the build install script, please check Upload a custom server build to GameLiftVC_redist.x64.exe /q
Release build
Create the required subfolders in your installation folder. The launcher looks for fixed subfolder locations to find assets and registry files, so the installation folder must have the following structure:
<package base folder>/bin
<package base folder>/assets
<package base folder>/assets/pc
Copy the following files to the
/bin
folder:- All the
*.exe
and*.dll
files fromo3de/build/windows/bin/release
.
- All the
Zip all the assets under
<project folder>/Cache/pc
as well as theRegistry
folder fromo3de/build/windows/bin/release/Registry/
into a package calledengine.pak
. Then addengine.pak
to the<package base folder>/assets/pc
folder.Copy the
VC_redist.x64.exe
file fromo3de/Tools/Redistributables/Visual Studio 2015-2019
to the package base folder.Create a build install script called
install.bat
in the package base folder and add the following content to the file. For more information about the build install script, please check Upload a custom server build to GameLiftVC_redist.x64.exe /q
Test server package
To test the local server package:
Start GameLift Local by following the Amazon GameLift documentation, Testing Your Integration .
Run the CLI command to start your server:
<package base folder>\bin\<server-launcher-executable> --engine-path=<package base folder> --project-path=<package base folder> --project-cache-path=<package base folder>\assets -bg_ConnectToAssetProcessor=0
Start a client and test the server behavior locally by following the Amazon GameLift Testing Your Integration documentation. The server log can be found at
<package base folder>/<unique server process id>/user/log/Server.log
.
Caution:Make sure to replace<package base folder>
with the path to the installation folder that you created earlier.