The following environment variables will be used for these instructions for consistency. Update the path values if needed to match the testing environment
Windows
set PROJECT_BASE=%HOMEPATH%\MPS_Test
set PROJECT_EXPORT_BASE=%HOMEPATH%\MPS_Export
Linux
export PROJECT_BASE=$HOME/MPS_Test
export PROJECT_EXPORT_BASE=$HOME/MPS_Export
Clone the development branch of O3DE and configure it:
Windows
git clone -b development https://github.com/o3de/o3de.git %PROJECT_BASE%\o3de
%PROJECT_BASE%\o3de\python\get_python.bat
%PROJECT_BASE%\o3de\scripts\o3de.bat register --this-engine
Linux
git clone -b development https://github.com/o3de/o3de.git %PROJECT_BASE%/o3de
$PROJECT_BASE/o3de/python/get_python.sh
$PROJECT_BASE/scripts/o3de.sh register --this-engine
Clone the development branch of the O3DE Multiplayer Sample Assets and its PopcornFX submodule
Windows
git clone -b development https://github.com/o3de/o3de-multiplayersample-assets.git %PROJECT_BASE%\o3de-multiplayersample-assets
git -C %PROJECT_BASE%\o3de-multiplayersample-assets submodule update --init --recursive
Linux
git clone -b development https://github.com/o3de/o3de-multiplayersample-assets.git %PROJECT_BASE%/o3de-multiplayersample-assets
git -C $PROJECT_BASE/o3de-multiplayersample-assets submodule update --init --recursive
Note: You may need to check the git revision of the Popcorn FX Plugin under:
...\o3de-multiplayersample-assets\Gems\O3DEPopcornFXPlugin
to make sure it is the latest version.
Register the Gems path for the O3DE Multiplayer Sample Assets that is needed for the Multiplayer Sample
Windows
%PROJECT_BASE%\o3de\scripts\o3de.bat register --all-gems-path %PROJECT_BASE%\o3de-multiplayersample-assets\Gems
Linux
$PROJECT_BASE/o3de/scripts/o3de.sh register --all-gems-path $PROJECT_BASE/o3de-multiplayersample-assets/Gems
Clone the development branch of the O3DE Multiplayer Sample and register the project:
Windows
git clone -b development https://github.com/o3de/o3de-multiplayersample.git %PROJECT_BASE%\o3de-multiplayersample
%PROJECT_BASE%\o3de\scripts\o3de.bat register -pp %PROJECT_BASE%\o3de-multiplayersample
Linux
git clone -b development https://github.com/o3de/o3de-multiplayersample.git $PROJECT_BASE/o3de-multiplayersample
$PROJECT_BASE/o3de/scripts/o3de.sh register -pp $PROJECT_BASE/o3de-multiplayersample
Generate the project packages using the project's export_mps.py
script in conjunction with the O3DE export command.
Create the directory you want to output the game and server.
Windows
mkdir %PROJECT_EXPORT_BASE%\packages
Linux
mkdir $PROJECT_EXPORT_BASE/packages
Run the o3de export script to generate the packages.
Windows
%PROJECT_BASE%\o3de\scripts\o3de.bat export-project -pp %PROJECT_BASE%\o3de-multiplayersample -es ExportScripts\export_mps.py -out %PROJECT_EXPORT_BASE%\mps_server -cfg release -a zip -nounified -code -gl -assets -ll INFO -cba -- /m
Linux
$PROJECT_BASE/o3de/scripts/o3de.sh export-project -pp $PROJECT_BASE/o3de-multiplayersample -es ExportScripts/export_mps.py -out $PROJECT_EXPORT_BASE/mps_server -cfg release -a zip -nounified -code -gl -assets -ll INFO
Note: The export commands described above will automatically enable the
MPSGameLift
gem when building the package. To opt-out of enabling GameLift, remove the-gl
argument from the above command.Note: The export commands above will also generate an archive (zip) of the output directories
Windows
%PROJECT_EXPORT_BASE%\packages\MultiplayerSampleServerPackage\MultiplayerSample.ServerLauncher.exe --rhi=null -NullRenderer --console-command-file=launch_server.cfg --net_udpDefaultTimeoutMs=20000
Linux
$PROJECT_EXPORT_BASE/packages/MultiplayerSampleServerPackage/MultiplayerSample.ServerLauncher --rhi=null -NullRenderer --console-command-file=launch_server.cfg --net_udpDefaultTimeoutMs=20000 &
Windows
%PROJECT_EXPORT_BASE%\packages\MultiplayerSampleGamePackage\MultiplayerSample.GameLauncher.exe --connect=127.0.0.1 --net_udpDefaultTimeoutMs=20000
Linux
$PROJECT_EXPORT_BASE/packages/MultiplayerSampleGamePackage/MultiplayerSample.GameLauncher --connect=127.0.0.1 --net_udpDefaultTimeoutMs=20000
%PROJECT_EXPORT_BASE%\packages\MultiplayerSampleServerPackage\user\log\server.log
, or %PROJECT_EXPORT_BASE%\packages\MultiplayerSampleGamePackage\user\log\game.log
.