Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge stabilization/2409 to main (do not apply until release day) #492

Merged
merged 50 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d7a23f7
Updates to the export project script and instructions for MPS (#463)
spham-amzn Aug 29, 2023
f342f39
Upgrading PopcornFx assets from 2.17.2 to 2.17.3
AMZN-Gene Aug 29, 2023
53b1b6e
Merge pull request #464 from aws-lumberyard-dev/PopcornFx_Upgrade_2.17.3
AMZN-Gene Aug 29, 2023
a2c31c1
Adding missing dependency to MPSGameLift gem
AMZN-Gene Aug 29, 2023
9554910
Merge pull request #465 from aws-lumberyard-dev/MPS_BuildAll_Fix
AMZN-Gene Aug 30, 2023
2a085e6
Adding popcorn particles that were upgraded to 2.17.2 to 2.17.3
AMZN-Gene Aug 30, 2023
7772489
Fix 4 out of 6 popcorn fx model error logs by switching popcorn parti…
AMZN-Gene Aug 30, 2023
f00b303
Merge pull request #466 from aws-lumberyard-dev/MissingPopcornUpgrades
AMZN-Gene Aug 30, 2023
a335efd
Updating export script to support building headless server. Also addi…
spham-amzn Oct 3, 2023
718f5a5
Removeing install.sh OS check. AL2023 is the only supported Gamelift …
spham-amzn Oct 3, 2023
690a53e
Updating export script to support building headless server. Also addi…
spham-amzn Oct 3, 2023
79e68c7
Removeing install.sh OS check. AL2023 is the only supported Gamelift …
spham-amzn Oct 3, 2023
a8cd985
Merge branch 'ExportScriptGameLift' of https://github.com/aws-lumbery…
AMZN-Gene Oct 3, 2023
1ccbbcd
Using https (secure) links to download make and glibc for the GameLif…
AMZN-Gene Oct 4, 2023
ec62aeb
Merge pull request #468 from aws-lumberyard-dev/ExportScriptGameLift
AMZN-Gene Oct 5, 2023
0cc12a4
Upgrade popcorn fx library from 3.17->3.18
AMZN-Gene Nov 15, 2023
7263475
Merge pull request #470 from aws-lumberyard-dev/PopcornFx_3.17_to_3.18
AMZN-Gene Nov 15, 2023
46e0fdd
Fix export script to pass in expected parameters
AMZN-Gene Nov 15, 2023
b6b8183
Merge pull request #471 from aws-lumberyard-dev/FixExportScript
AMZN-Gene Nov 15, 2023
7f9ecd1
Cleaned up GameLift install.sh to install Amazon Linux 2023 runtime …
AMZN-Gene Nov 27, 2023
130583c
Merge pull request #472 from aws-lumberyard-dev/GameLiftSimpleInstallSh
AMZN-Gene Nov 28, 2023
569e81b
removing terrain gradient until crash issue is fixed (https://github.…
AMZN-Gene Jan 22, 2024
2f7bf5e
Merge pull request #474 from aws-lumberyard-dev/GHI_17255_TerrainCras…
AMZN-Gene Jan 23, 2024
4d32015
Editor image gradient crash has been fixed, so reenable terrain in Mu…
AMZN-Gene Feb 13, 2024
e401f04
Merge pull request #475 from aws-lumberyard-dev/GEDS-408_EnableTerrain
AMZN-Gene Feb 13, 2024
8e2def8
Adding logo to fix compiler error
AMZN-Gene Feb 14, 2024
deadd27
Merge pull request #476 from aws-lumberyard-dev/LogoCompileFix
AMZN-Gene Mar 12, 2024
543b23e
Fix compile and python errors from the export script (#477)
spham-amzn May 7, 2024
15f8330
Update README
AMZN-Gene May 24, 2024
b5d5538
Merge pull request #478 from o3de/AMZN-Gene-patch-1
AMZN-Gene May 24, 2024
468f8c3
Use the new, built-in O3DE export script for creating the gamelift pa…
AMZN-Gene Jun 5, 2024
6784004
Minor. Fixed documenation build path
AMZN-Gene Jun 5, 2024
3ea001a
Merge pull request #480 from aws-lumberyard-dev/BuiltInExportScript
AMZN-Gene Jun 5, 2024
b11c79c
Docker support for Multiplayer Sample (#479)
spham-amzn Jun 5, 2024
46182e1
Alternate example of multiplier sample entity filtering component usi…
gadams3 Jun 13, 2024
f1d6b81
deleting extra character to fix typo
gadams3 Jun 14, 2024
d7abefd
Removing unnecessary maybe unused and updating occlusion bus function…
gadams3 Jun 18, 2024
ef7dcdb
Merge pull request #481 from o3de/gadams3/occlusionbus_volumetovolume…
gadams3 Jun 19, 2024
92b7944
Removing deprecated function call from multiplayer sample settings
gadams3 Jul 10, 2024
1ba22dc
Merge pull request #482 from o3de/gadams3/remove_deprecated_call
gadams3 Jul 10, 2024
47980a7
Upgrading PkFx assets to 19.5 to match the latest PopcornFx plugin
AMZN-Gene Jul 12, 2024
a1db836
Merge pull request #484 from aws-lumberyard-dev/UpgradePopcornFxAssets
AMZN-Gene Jul 15, 2024
05c32de
Updated occlusion filter class with no occlusion bus api changes
gadams3 Jul 15, 2024
2153779
Merge pull request #486 from o3de/gadams3/support_culling_by_entity_i…
gadams3 Jul 24, 2024
b626f0a
Gamepad controls: left stick moves player, right-stick moves camera, …
AMZN-Gene Aug 30, 2024
9c40c43
Accidently broke keyboard move-left, fixed now
AMZN-Gene Aug 30, 2024
9e64262
Merge pull request #489 from aws-lumberyard-dev/GHI_488_PlayerGamepad…
AMZN-Gene Aug 30, 2024
4c06720
Adding more gamepad options. Y=jump, x-axis is inverted, and left-tri…
AMZN-Gene Sep 6, 2024
368881d
Merge pull request #491 from aws-lumberyard-dev/MPS_Gamepad_Jump
AMZN-Gene Sep 9, 2024
b765b55
Merge stabilization/2409 into main as part of the release.
nick-l-o3de Oct 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.idea/
.vs/
.vscode/
.command_settings
_savebackup/
.mayaSwatches/
*.swatches
Expand All @@ -10,5 +11,6 @@ _savebackup/
Sounds/wwise_project/*.wsettings
CMakeUserPresets.json
*.code-workspace
project.json.bak*
AssetBundling/AssetLists/
AssetBundling/Bundles/
AssetBundling/Bundles/
125 changes: 125 additions & 0 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#

ARG INPUT_ARCHITECTURE=amd64

ARG INPUT_IMAGE=ubuntu

ARG INPUT_TAG=jammy

FROM ${INPUT_ARCHITECTURE}/${INPUT_IMAGE}:${INPUT_TAG}

# Argument for determining the package type ('server', 'headless-server', 'game', or 'unified-launcher')
ARG PACKAGE_TYPE=game # Default to 'game'

# o3de repo arguments
ARG O3DE_REPO=https://github.com/o3de/o3de
ARG O3DE_BRANCH=development
ARG O3DE_COMMIT=HEAD

# o3de-extras repo arguments
ARG O3DE_EXTRAS_REPO=https://github.com/o3de/o3de-extras
ARG O3DE_EXTRAS_BRANCH=development
ARG O3DE_EXTRAS_COMMIT=HEAD

# o3de-multiplayersample repo arguments
ARG O3DE_MPS_REPO=https://github.com/o3de/o3de-multiplayersample
ARG O3DE_MPS_BRANCH=development
ARG O3DE_MPS_COMMIT=HEAD

# o3de-multiplayersample-assets repo arguments
ARG O3DE_MPS_ASSETS_REPO=https://github.com/o3de/o3de-multiplayersample-assets
ARG O3DE_MPS_ASSETS_BRANCH=development
ARG O3DE_MPS_ASSETS_COMMIT=HEAD


# Argument to run fullscreen (for game, unified, and server package types)
ARG RUN_FULLSCREEN=0

# Set the workspace to work from
ENV WORKSPACE=/data/workspace
WORKDIR $WORKSPACE

# o3de Environment
ENV O3DE_REPO=$O3DE_REPO
ENV O3DE_BRANCH=$O3DE_BRANCH
ENV O3DE_COMMIT=$O3DE_COMMIT
ENV O3DE_ROOT=$WORKSPACE/o3de

# o3de-extras Environment
ENV O3DE_EXTRAS_REPO=$O3DE_EXTRAS_REPO
ENV O3DE_EXTRAS_BRANCH=$O3DE_EXTRAS_BRANCH
ENV O3DE_EXTRAS_COMMIT=$O3DE_EXTRAS_COMMIT
ENV O3DE_EXTRAS_ROOT=$WORKSPACE/o3de-extras

# o3de-multiplayersample Environment
ENV O3DE_MPS_ASSETS_REPO=$O3DE_MPS_ASSETS_REPO
ENV O3DE_MPS_ASSETS_BRANCH=$O3DE_MPS_ASSETS_BRANCH
ENV O3DE_MPS_ASSETS_COMMIT=$O3DE_MPS_ASSETS_COMMIT
ENV O3DE_MPS_ASSETS_ROOT=$WORKSPACE/o3de-multiplayersample-assets

# o3de-multiplayersample-assets Environment
ENV O3DE_MPS_REPO=$O3DE_MPS_REPO
ENV O3DE_MPS_BRANCH=$O3DE_MPS_BRANCH
ENV O3DE_MPS_COMMIT=$O3DE_MPS_COMMIT
ENV O3DE_MPS_ROOT=$WORKSPACE/o3de-multiplayersample

# Validate and set the package type
RUN if [ $PACKAGE_TYPE = "game" ];then echo "Building Game Launcher Image"; \
elif [ $PACKAGE_TYPE = "unified" ];then echo "Building Unified Launcher Image"; \
elif [ $PACKAGE_TYPE = "server" ];then echo "Building Server Launcher Image"; \
elif [ $PACKAGE_TYPE = "headless" ];then echo "Building Headless Server Launcher Image"; \
else echo "Invalid PACKAGE_TYPE argument '$PACKAGE_TYPE'. Must be one of ('server', 'headless', 'game', or 'unified')" && exit 1; \
fi
ENV PACKAGE_TYPE=$PACKAGE_TYPE
ENV RUN_FULLSCREEN=$RUN_FULLSCREEN

# Add additional package repositories needed for packages
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
ca-certificates \
git \
git-lfs \
libstdc++-12-dev \
clang\
ninja-build \
cmake \
libglu1-mesa-dev \
libxcb-xinerama0 \
libxcb-xinput0 \
libxcb-xinput-dev \
libxcb-xfixes0-dev \
libxcb-xkb-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libfontconfig1-dev \
libcurl4-openssl-dev \
libsdl2-dev \
zlib1g-dev \
mesa-common-dev \
libssl-dev \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-randr0 \
libnvidia-gl-470 \
libunwind-dev \
libzstd-dev \
binutils-dev \
libvulkan1

COPY build.sh $WORKSPACE/build.sh
COPY launch.sh $WORKSPACE/launch.sh

RUN $WORKSPACE/build.sh \
&& rm $WORKSPACE/build.sh

ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES all

ENTRYPOINT ["/bin/bash", "-c", "/data/workspace/launch.sh"]
119 changes: 119 additions & 0 deletions Docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Docker support for Multiplayer Sample

The O3DE Multiplayer Sample supports construction of Docker images on the Linux environment.

## Prerequisites

* [Hardware requirements of o3de](https://www.o3de.org/docs/welcome-guide/requirements/)
* Any Linux distribution that supports Docker and the NVIDIA container toolkit (see below)
* **Note** For the headless server flavor, the NVIDIA container toolkit is not required.
* At least 60 GB of free disk space
* Docker installed and configured
* **Note** It is recommended to have Docker installed correctly and in a secure manner so that the Docker commands in this guide do not require elevated priviledges (sudo) in order to run them. See [Docker Engine post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) for more details.
* [NVidia container toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker)

# Building the Docker image
The Docker scripts accepts arguments to control how to build the Docker image for the Multiplayer Sample. The main argument, `PACKAGE_TYPE` controls the type of launcher that will be built from the Docker build process. There are four different types of launchers supported:

1. **game** : The game client that will connect to a game server.
2. **server** : The game server that will accept remote game clients and will also provide a display of running game sessions.
3. **unified** : The combined game client that also can run as the game server.
4. **headless** : The game server that will accept remote game clients but will not display and GUI or window. This is launcher is designed to run on headless servers.

In addition to `PACKAGE_TYPE`, there are additional arguments that can control how the Docker image is built:

| Argument | Description | Default
|-------------------------|----------------------------------------------------------------------------|-------------
| INPUT_ARCHITECTURE | The CPU architecture (amd64/aarch64). Will require QEMU if cross compiling | amd64
| INPUT_IMAGE | The base linux distro docker image to base the build on | ubuntu
| INPUT_TAG | The base linux distro docker image tag to base the build on | jammy
| O3DE_REPO | The git repo for O3DE | https://github.com/o3de/o3de
| O3DE_BRANCH | The branch for O3DE | development
| O3DE_COMMIT | The commit on the branch for O3DE (or HEAD) | HEAD
| O3DE_EXTRAS_REPO | The git repo for O3DE Extras | https://github.com/o3de/o3de-extras
| O3DE_EXTRAS_BRANCH | The branch for O3DE Extras | development
| O3DE_EXTRAS_COMMIT | The commit on the branch for O3DE Extras (or HEAD) | HEAD
| O3DE_MPS_REPO | The git repo for main Multiplayer Sample project | https://github.com/o3de/o3de-multiplayersample
| O3DE_MPS_BRANCH | The branch for main Multiplayer Sample project | development
| O3DE_MPS_COMMIT | The commit on the branch for Multiplayer Sample project (or HEAD) | HEAD
| O3DE_MPS_ASSETS_REPO | The git repo for Multiplayer Sample Assets | https://github.com/o3de/o3de-multiplayersample-assets
| O3DE_MPS_ASSETS_BRANCH | The branch for Multiplayer Sample Assets | development
| O3DE_MPS_ASSETS_COMMIT | The commit on the branch for Multiplayer Sample Assets (or HEAD) | HEAD
| RUN_FULLSCREEN | Option to launch the game, unified, or server in fullscreen mode (0=no, 1=yes) | 0


## Examples

### Locally (From the o3de-multiplayersample/Docker folder)
The following examples will be the different supported types of launchers using the local Docker context folder in the `o3de-multiplayersample` local repo.

#### Game Launcher
```
docker build --build-arg PACKAGE_TYPE=game -f Dockerfile -t amd64/o3de-mps-game:jammy .
```
#### Unified Game Launcher
```
docker build --build-arg PACKAGE_TYPE=unified -f Dockerfile -t amd64/o3de-mps-unified:jammy .
```
#### Server Launcher
```
docker build --build-arg PACKAGE_TYPE=server -f Dockerfile -t amd64/o3de-mps-server:jammy .
```
#### Headless Server Launcher
```
docker build --build-arg PACKAGE_TYPE=headless -f Dockerfile -t amd64/o3de-mps-headless:jammy .
```

### From github
The following examples will be the different supported types of launchers using the Docker context found in the github repo for `o3de-multiplayersample` and the `development` branch.

#### Game Launcher
```
docker build --build-arg PACKAGE_TYPE=game -t amd64/o3de-mps-game:jammy https://github.com/o3de/o3de-multiplayersample.git#development:Docker
```
#### Unified Game Launcher
```
docker build --build-arg PACKAGE_TYPE=unified -t amd64/o3de-mps-unified:jammy https://github.com/o3de/o3de-multiplayersample.git#development:Docker
```
#### Server Launcher
```
docker build --build-arg PACKAGE_TYPE=server -t amd64/o3de-mps-server:jammy https://github.com/o3de/o3de-multiplayersample.git#development:Docker
```
#### Headless Server Launcher
```
docker build --build-arg PACKAGE_TYPE=headless -t amd64/o3de-mps-headless:jammy https://github.com/o3de/o3de-multiplayersample.git#development:Docker
```


# Running the Docker image locally
Running the non-headless Docker images requires Vulkan and GPU acceleration provided by the NVIDIA drivers and container toolkit. The following directions will describe how to launch the Docker containers, utilizing the host Linux machine's X11 display and NVIDIA drivers, and connecting to the default 'bridge' network. (For advanced network isolation, refer to Docker's command-line reference for [network](https://docs.docker.com/reference/cli/docker/container/run/#network))



#### Game Launcher
```
xhost +local:root
docker run --rm --gpus all -e DISPLAY=:1 --network="bridge" -v /tmp/.X11-unix:/tmp/.X11-unix -it amd64/o3de-mps-game:jammy
```
#### Unified Game Launcher
```
xhost +local:root
docker run --rm --gpus all -e DISPLAY=:1 --network="bridge" -v /tmp/.X11-unix:/tmp/.X11-unix -it amd64/o3de-mps-unified:jammy
```
#### Server Launcher
```
xhost +local:root
docker run --rm --gpus all -e DISPLAY=:1 --network="bridge" -v /tmp/.X11-unix:/tmp/.X11-unix -it amd64/o3de-mps-server:jammy
```
#### Headless Server Launcher
```
docker run --network="bridge" -it amd64/o3de-mps-headless:jammy
```
>**Note** Headless server does not require access to the host display or NVIDIA drivers



# Deploying the Docker image
The Docker image can be published to any docker container registry and deployed on any Linux operating system that supports Docker.


Loading