Whenever you start working with a new tool, you need to learn it first, and Elympics is no exception. Going through our documentation may be time-consuming, so we prepared a series of easily-digestible tutorials that will show you how to implement it into your game. ⚙️

In this three-part series, you’ll be migrating a local, hot-seat multiplayer game to an online gameplay. Elympics will also make it fully server-authoritative, deterministic and fair. 

We’ll do it on the example of the pong, one of the first computer games ever created. In this part of the series, you’ll learn how to integrate the Elympics package into a Unity game. Let’s get started! 

Launching local pong in Unity

Our local multiplayer game consists of the basic functionalities of the pong: 

  • moving pads (player 1: arrow keys, player 2: W/S keys) 🚶
  • ball bouncing ⚾️
  • score counting 💯
  • match control (win / lose conditions) 🥇

You can download the game here. Once you do it, launch it in Unity. Feel free to launch the Play Mode and play around in the local, hot-seat mode to see how it works.

Downloading Elympics

To start your journey with Elympics, first download it using Unity Package Manager. Open it in Unity in WindowPackage Manager.

Choose Add package from git URL and download Elympics SDK package by pasting this address: https://github.com/Elympics/Unity-SDK.git

After doing so, you should have new menu bar items available: ParrelSync and Tools (with Elympics hidden inside). You’re ready to jump right to your multiplayer configuration!

Configuring Elympics

To create a multiplayer game using Elympics, you need to create the local Game Config, an object that gathers all the information about gameplay settings, synchronization, etc.

First, log in to your developer account for Elympics. Go to Tools  → Elympics  → Manage games in Elympics.

Input your login credentials (email and password) and make sure that your Elympics Web Endpoint is set correctly to https://api.elympics.cc and marked as Connected.

If you don’t have an Elympics account, you’ll need to create one here.

Now, click Synchronize to download your current endpoints and game configurations.

Before completing the next step, you’ll need a configured Elympics game in our web panel.

The next step is to create a Game Config object for our game. Note that it’s a local (Unity) game config, but it needs to be synchronized with the web. We don’t have any configs now, so let’s create one with Create first game config!.

Copy the name and the identifier from the game list displayed below your account data. Set your version number and select the gameplay scene PongDemo.

Gameplay scene is the scene that Elympics will launch once your players connect to the game.

The configuration is done! The last step of the setup is to add the Elympics root object to your gameplay scene.

Configuring scene

To use Elympics during the gameplay, you’ll need to add the main Elympics object (prefab) to your scene. To do that, right-click in your scene hierarchy and select ElympicsSystem.

That's it!

Congrats, you’ve successfully integrated Elympics package to your game!  🎉 In the next part of the series, we’ll focus on adding world synchronization and input handling.

In the meantime, visit our Discord where you'll find all the updates about the games built on Elympics and hints from our developers.