This README covers installation and running MultiplayerSample project on Ubuntu Linux. Refer Open 3D Engine on Linux for setting up the engine on Linux.
This repository uses Git LFS for storing large binary files. You will need to create a Github personal access token to authenticate with the LFS service.
You will need your personal access token credentials to authenticate when you clone the repository.
Create a personal access token with the 'repo' scope.
Recent versions of Git install a credential manager to store your credentials so you don't have to put in the credentials for every request. It is highly recommended you check that you have a credential manager installed and configured
Let's assume you are cloning the engine and the project to /home/your_username/git where your_username is your Linux username and /home/your_username is your home folder. The rest of the readme will reference this path as ~.
> cd ~
> mkdir git
> cd git
# Clone the engine.
> git clone https://github.com/o3de/o3de
Cloning into 'o3de'...
# Clone the project into a folder outside your engine repository folder.
> git clone https://github.com/o3de/o3de-multiplayersample.git
Cloning into 'o3de-multiplayersample'...
# Register the engine (only need to do this once).
> cd ~/git/o3de
> ./scripts/o3de.sh register --this-engine
# Register the project.
> ./scripts/o3de.sh register -p ~/git/o3de-multiplayersample
This option will output all the project binaries in the project's build folder e.g. ~/git/o3de-multiplayersample/build.
> cd ~/git/o3de-multiplayersample
> mkdir build
> cd build
# Configure.
> cmake .. -G "Ninja Multi-Config" -DCMAKE_BUILD_TYPE=profile -DLY_3RDPARTY_PATH=~/ws/3rdParty -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PROJECTS="~/git/o3de-multiplayersample"
# Build the Editor, game launcher and server launcher.
> cmake --build . --config profile --target Editor MultiplayerSample.GameLauncher MultiplayerSample.ServerLauncher
> cd ~/git/o3de-multiplayersample/build
> cmake --build . --config profile --target Multiplayer.Tests
# Run unit tests and benchmarks
> ./bin/profile/AzTestRunner ./bin/profile/libMultiplayer.Tests.so AzRunBenchmarks
> ./bin/profile/AzTestRunner ./bin/profile/libMultiplayer.Tests.so AzRunUnitTests
Under engine root, create 2 files: client.cfg and server.cfg. File ~/git/o3de/client.cfg should contain:
connect
File ~/git/o3de/server.cfg should contain:
host
LoadLevel Levels/SampleBase/SampleBase.spawnable
> cd ~/git/o3de-multiplayersample/build
> cmake --build . --config profile --target AssetProcessor
# Launch Asset Processor and verify that MultiplayerSample assets are good.
> ./bin/profile/AssetProcessor &
A server can be run as follows:
> cd ~/git/o3de-multiplayersample/build
> ./bin/profile/MultiplayerSample.ServerLauncher --console-command-file=server.cfg
A client can be run with:
> cd ~/git/o3de-multiplayersample/build
> ./bin/profile/MultiplayerSample.GameLauncher --console-command-file=client.cfg
This will connect a client to the local server and start a multiplayer session.
For terms please see the LICENSE*.TXT file at the root of this distribution.