Building And Running Locally

Note: These instructions will be for Ubuntu, but they should work the same on other distros. Just replace the apt calls with your repo's package manager.

1. Installing the toolchain and dependencies

To build the project, we'll need to install some packages:

sudo apt install g++ cmake libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-gfx-dev libgtk-3-dev ninja-build

2. Downloading the project files

We're going to use Repose as our example project. Download the project's source code and unzip it.

Or, if you're comfortable cloning a git repo, you can instead run:

git clone --recursive git@github.com:Net5F/Repose.git

3. Building the project

We're ready to build! In the root "Repose" directory that we unzipped, make a build directory and navigate to it:

mkdir -p Build/Linux/Release && cd Build/Linux/Release

Then, run the CMake configure step:

cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ../../../

Note: If the command says your CMake version is too old, you can run the script at Libraries/AmalgamEngine/Scripts/Linux/GetRequiredCmake.sh (or use it as an example of how to install a newer CMake version).

Finally, we can run the build:

ninja all

4. Running the server and client

After the build step is complete, we can go look for our executables.

Open the Repose/Build/Linux/Release/Source directory and you should see Client and Server directories.

Open another terminal. In one, open the Server directory and run the Server binary. In the other, open the Client directory and run the Client binary. You now should be able to press the "Connect" button in the client to connect to your server.

Congratulations! You're now in full control of your own virtual world.