Olex Lozitskiy 3 лет назад
Родитель
Сommit
9910bd3dc3
1 измененных файлов с 127 добавлено и 0 удалено
  1. 127 0
      README_LINUX.md

+ 127 - 0
README_LINUX.md

@@ -0,0 +1,127 @@
+# MultiplayerSample Project for Linux
+## Download and Install
+
+This README covers installation and running MultiplayerSample project on Ubuntu Linux.
+Refer [Open 3D Engine on Linux](https://o3de.org/docs/user-guide/platforms/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.
+
+
+### Create a Git Personal Access Token
+
+You will need your personal access token credentials to authenticate when you clone the repository.
+
+[Create a personal access token with the 'repo' scope.](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)
+
+
+### (Recommended) Verify you have a credential manager installed to store your credentials
+
+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](https://github.com/microsoft/Git-Credential-Manager-Core#linux)
+
+
+
+### Step 1. Clone the repositories
+
+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 **~**.
+
+```shell
+> 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'...
+```
+
+
+### Step 2. Register the engine and project
+
+```shell
+# 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
+```
+
+### Step 3. Configure and build with Project-centric approach
+
+This option will output all the project binaries in the project's build folder e.g. **~/git/o3de-multiplayersample/build**.
+
+```shell
+> 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
+```
+
+#### Step 3b. (Optional) Build and Run Multiplayer Unit Tests
+
+```shell
+> 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
+```
+
+### Step 4. Setup Client and Server
+
+Under engine root, create 2 files: **client.cfg** and **server.cfg**. File ~/git/o3de/client.cfg should contain:
+
+```shell
+connect
+```
+
+File ~/git/o3de/server.cfg should contain:
+
+```shell
+host
+LoadLevel Levels/SampleBase/SampleBase.spawnable
+```
+
+### Step 5. Verify Asset Processor
+
+```shell
+> cd ~/git/o3de-multiplayersample/build
+> cmake --build . --config profile --target AssetProcessor
+# Launch Asset Processor and verify that MultiplayerSample assets are good.
+> ./bin/profile/AssetProcessor &
+```
+
+### Step 6. Run a Server and a Client
+
+
+A server can be run as follows:
+
+```shell
+> cd ~/git/o3de-multiplayersample/build
+> ./bin/profile/MultiplayerSample.ServerLauncher --console-command-file=server.cfg
+```
+
+A client can be run with:
+
+```shell
+> 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.
+
+
+
+## License
+
+For terms please see the LICENSE*.TXT file at the root of this distribution.