|
@@ -1,64 +1,116 @@
|
|
# Packaged MultiplayerSample Builds
|
|
# Packaged MultiplayerSample Builds
|
|
|
|
+
|
|
To make relocatable client and server builds for the MultiplayerSample, we recommend making packaged builds. These package builds will contain the Game or Server Launcher and the bundled assets needed to run the launcher outside of the developer environment.
|
|
To make relocatable client and server builds for the MultiplayerSample, we recommend making packaged builds. These package builds will contain the Game or Server Launcher and the bundled assets needed to run the launcher outside of the developer environment.
|
|
|
|
|
|
You can make both release packaged builds or profile packaged builds. For more information about creating release builds, see the O3DE documentation on [Creating a Project Game Release Layout for Windows](https://www.o3de.org/docs/user-guide/packaging/windows-release-builds/).
|
|
You can make both release packaged builds or profile packaged builds. For more information about creating release builds, see the O3DE documentation on [Creating a Project Game Release Layout for Windows](https://www.o3de.org/docs/user-guide/packaging/windows-release-builds/).
|
|
|
|
|
|
The guide below covers how to make profile packaged builds which are very useful for early sharing and play testing.
|
|
The guide below covers how to make profile packaged builds which are very useful for early sharing and play testing.
|
|
|
|
|
|
|
|
+## Brief outline of the packaging steps
|
|
|
|
+
|
|
|
|
+1. Install Wwise SDK (required for o3de-multiplayersample but optional for other projects)
|
|
|
|
+1. Use the engine from GitHub, not the installer
|
|
|
|
+1. Compile o3de-multiplayersample and the engine (non-monolithic)
|
|
|
|
+1. Process assets using the Asset Processor
|
|
|
|
+1. Create asset bundles (.pak files) from asset seed lists (a list of game assets)
|
|
|
|
+1. Compile o3de-multiplayersample and the engine (monolithic profile or release)
|
|
|
|
+1. Copy the game binaries and asset bundles to a release folder you can share
|
|
|
|
+
|
|
|
|
+## Pre-requisites
|
|
|
|
+
|
|
|
|
+*Important*: you can not use an installer to produce packaged builds. In order to produce a packaged build, you will need to build the engine from source from GitHub.
|
|
|
|
+
|
|
|
|
+Additionally, we will need to compile the engine in non-monolithic profile build and in monolithic profile (and optionally release) mode.
|
|
|
|
+
|
|
|
|
+> Note, a monolithic build is a special build of O3DE engine and projects that combines all the gems used by the project into a single game executable. Additionally, monolithic builds do not build the Editor or the Asset Processor. Thus, a regular non-monolithic build is used to process assets and bundle them into .pak files, while a monolithic build is used to produce share-able game binaries.
|
|
|
|
+
|
|
|
|
+This guide uses `C:\git\o3de` is the source for the O3DE, cloned from GitHub.
|
|
|
|
+`C:\git\o3de-multiplayersample` is the location of the clone project. These paths are optional. If you choose to use different paths, amend the command scripts in the rest of the guide accordingly.
|
|
|
|
+
|
|
## Windows Profile PAK Setup
|
|
## Windows Profile PAK Setup
|
|
|
|
|
|
-### Install WWise
|
|
|
|
-Go to https://www.audiokinetic.com/download/, create a login, log in, and download the installer. WWise is needed to process and package audio assets in the project.
|
|
|
|
|
|
+Multiplayer Sample uses Wwise gem and assets for audio effects. O3DE engine (and O3DE installers) do not include Wwise support by default. In order to add the Wwise support in the engine, one must first install Wwise SDK and then re-build O3DE engine from source.
|
|
|
|
|
|
-
|
|
|
|
|
|
+### Install Wwise
|
|
|
|
+Go to https://www.audiokinetic.com/download/, create a login, log in, and download the installer. Wwise is needed to process and package audio assets in the project.
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
Inside the installer select the version to use. Install version **2021.1.11.7933**, select both Authoring and SDK, Microsoft platform.
|
|
Inside the installer select the version to use. Install version **2021.1.11.7933**, select both Authoring and SDK, Microsoft platform.
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
> REBOOT (or logout / login). Otherwise, the environment settings won't get picked up for any builds in Visual Studio. They will only apply to command-line builds, and only for any command-line windows that have been opened after the installer finishes.
|
|
> REBOOT (or logout / login). Otherwise, the environment settings won't get picked up for any builds in Visual Studio. They will only apply to command-line builds, and only for any command-line windows that have been opened after the installer finishes.
|
|
|
|
|
|
-### Build profile build and process assets
|
|
|
|
|
|
+### Build o3de-multiplayersample and the engine (non-monolithic)
|
|
|
|
+
|
|
|
|
+Build a regular profile build of the game as per the [README.md](../README.md) in an engine-centric way. Be sure to build from the source engine and not the installer. Here is an example:
|
|
|
|
+
|
|
|
|
+Clone the engine from source.
|
|
|
|
+
|
|
|
|
+```shell
|
|
|
|
+C:\git> git clone https://github.com/o3de/o3de
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+Navigate to `C:\git\o3de`.
|
|
|
|
+Create a build folder for non-monolithic build of the engine, for example `C:\git\o3de\build\non_mono`.
|
|
|
|
|
|
-Build and run MPS as per the [README.md](../README.md) and ensure all assets are built.
|
|
|
|
|
|
+> The location and the name of the build folder is optional.
|
|
|
|
|
|
-### Test the profile build
|
|
|
|
|
|
+Configure the engine in a non-monolithic mode with o3de-multiplayersample project.
|
|
|
|
|
|
-* Open the game in editor
|
|
|
|
- * load `NewStarBase` level
|
|
|
|
- * Verify that game can launch and connect to local server from editor
|
|
|
|
-* Validate local game launcher can connect to local server
|
|
|
|
|
|
+```shell
|
|
|
|
+C:\git\o3de> cmake -S . -B build\non_mono -DLY_MONOLITHIC_GAME=0 -DLY_PROJECTS="C:\git\o3de-multiplayersample"
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+> `-DLY_MONOLITHIC_GAME=0` is the default value but for clarity it's specified here explicitly.
|
|
|
|
+
|
|
|
|
+Build the Editor and the Asset Bundler. This will compile the project and necessary gems to produce the required game assets.
|
|
|
|
|
|
-### Build AssetBuilder
|
|
|
|
|
|
+```shell
|
|
|
|
+C:\git\o3de> cmake --build build\non_mono --target Editor --target AssetBundler --config profile
|
|
|
|
+```
|
|
|
|
|
|
-You will need to build the [AssetBundler](https://www.o3de.org/docs/user-guide/packaging/asset-bundler/overview/) tool if not built.
|
|
|
|
|
|
+> You will need to build the [AssetBundler](https://www.o3de.org/docs/user-guide/packaging/asset-bundler/overview/) tool to create game bundles (.pak files).
|
|
|
|
+
|
|
|
|
+Run the Asset Processor with o3de-multiplayersample and let all the assets get processed.
|
|
|
|
|
|
-For example:
|
|
|
|
```shell
|
|
```shell
|
|
-cmake --build build\windows --target AssetBundler --config profile -- /m /nologo
|
|
|
|
|
|
+C:\git\o3de> .\build\non_mono\bin\profile\AssetProcessor.exe --project-path C:\git\o3de-multiplayersample
|
|
```
|
|
```
|
|
|
|
|
|
### Build monolithic game
|
|
### Build monolithic game
|
|
|
|
|
|
Build a second version of the executables as monolithic pak builds.
|
|
Build a second version of the executables as monolithic pak builds.
|
|
|
|
|
|
-``` shell
|
|
|
|
|
|
+> A separate build folder is required for building monolithic binaries, separate from the non-monolithic build folder.
|
|
|
|
+
|
|
|
|
+```shell
|
|
# Create build files for a monolithic build that also disables all user/project registry settings overrides
|
|
# Create build files for a monolithic build that also disables all user/project registry settings overrides
|
|
-cmake -B build\windows_mono -S . -G "Visual Studio 16" -DLY_3RDPARTY_PATH=c:\your\path\to\3rdParty -DLY_MONOLITHIC_GAME=1 -DALLOW_SETTINGS_REGISTRY_DEVELOPMENT_OVERRIDES=0
|
|
|
|
|
|
+C:\git\o3de> cmake -S . -B build\mono -DLY_MONOLITHIC_GAME=1 -DALLOW_SETTINGS_REGISTRY_DEVELOPMENT_OVERRIDES=0 -DLY_PROJECTS="C:\git\o3de-multiplayersample"
|
|
|
|
|
|
# Build the profile versions of all the executables
|
|
# Build the profile versions of all the executables
|
|
-cmake --build build\windows_mono --target MultiplayerSample.GameLauncher MultiplayerSample.ServerLauncher MultiplayerSample.UnifiedLauncher --config profile -- /m /nologo
|
|
|
|
|
|
+C:\git\o3de> cmake --build build\mono --target MultiplayerSample.GameLauncher MultiplayerSample.ServerLauncher MultiplayerSample.UnifiedLauncher --config profile
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+Profile monolithic game binaries will be located in `C:\git\o3de\build\mono\bin\profile`.
|
|
|
|
+Optionally, you can build monolithic release game binaries.
|
|
|
|
+
|
|
|
|
+> Release game binaries won't have to access to a developer console and/or certain logs. It is a good idea to get profile monolithic build to work before test the release monolithic binaries.
|
|
|
|
+
|
|
|
|
+```shell
|
|
|
|
+C:\git\o3de> cmake --build build\mono --target MultiplayerSample.GameLauncher MultiplayerSample.ServerLauncher MultiplayerSample.UnifiedLauncher --config release
|
|
```
|
|
```
|
|
|
|
|
|
-The outputs in windows_mono\bin\profile can be copied and run anywhere, once the pak files are put in the proper location.
|
|
|
|
|
|
+Release monolithic game binaries will be located in `C:\git\o3de\build\mono\bin\release`. The contents of these folders can be copied and run anywhere, once the game bundles (.pak files) are put in the proper location.
|
|
|
|
|
|
|
|
|
|
### Bundle Content
|
|
### Bundle Content
|
|
|
|
|
|
Run the AssetBundler
|
|
Run the AssetBundler
|
|
|
|
|
|
-```
|
|
|
|
-build\windows\bin\profile\AssetBundler.exe --project-path="c:\your\path\to\o3de-multiplayersample"
|
|
|
|
|
|
+```shell
|
|
|
|
+build\non_mono\bin\profile\AssetBundler.exe --project-path="c:\your\path\to\o3de-multiplayersample"
|
|
```
|
|
```
|
|
|
|
|
|
Follow steps for "Create a bundle for game assets", "Create a bundle for engine assets" and "Add bundles to the release game layout" from https://www.o3de.org/docs/user-guide/packaging/asset-bundler/bundle-assets-for-release/
|
|
Follow steps for "Create a bundle for game assets", "Create a bundle for engine assets" and "Add bundles to the release game layout" from https://www.o3de.org/docs/user-guide/packaging/asset-bundler/bundle-assets-for-release/
|
|
@@ -115,7 +167,7 @@ After running, check the output logs to verify there aren't any crashes, missing
|
|
|
|
|
|
Instructions for Linux are similar to Windows instructions above. All examples are Ubuntu 22.04 which is the primary Linux platform for O3DE. See https://www.o3de.org/docs/welcome-guide/requirements/ for more details.
|
|
Instructions for Linux are similar to Windows instructions above. All examples are Ubuntu 22.04 which is the primary Linux platform for O3DE. See https://www.o3de.org/docs/welcome-guide/requirements/ for more details.
|
|
|
|
|
|
-## Install WWise
|
|
|
|
|
|
+## Install Wwise
|
|
See instructions above but install Wwise for Linux Ubuntu
|
|
See instructions above but install Wwise for Linux Ubuntu
|
|
|
|
|
|
### Build profile build and process assets
|
|
### Build profile build and process assets
|