Skip to main content

Run games locally

Development modes

We're working on multiplayer games, however during development it's easiest and quickest to work locally. Elympics supports 3 distinct run network modes when running from the gameplay scene in Unity Editor:

  • Local Player and Bots - run server, player and bots locally on single Unity instance with no networking. This is the easiest, but often most misleading mode. Good for anything outside of gameplay, such as UI, graphics and sound design.
  • Half Remote - run the server, players and bots separately with simulated networking. Best for gameplay development - provides a semi-realistic game behavior with relatively quick testing cycles - you'll probably spend most of the time using this mode.
  • Debug Online Player - directly connect to Elympics-hosted game instance - the same mode that will be used in production. Remember that in order run it this way, you'll need to upload your Linux game build first. Its main use case is debugging.

Half remote mode

Half remote mode will allow us to run both server and client games between multiple editor instances and/or game builds. In our case, one of the editors will act as a server, and all others will join as players (clients). Here comes a very convenient package bundled with Elympics: ParrelSync.

In order to create another editor, launch ParrelSync -> Clones Manager and add a new clone of your game by clicking Create a new clone. This can take a while. After it's done, you should be able to see two clones of launchable Unity instances.

Two Clones

In some cases in order to test your game, you'll only need 2 distinct clones (one for the server and one for the player). So let's Open in New Editor in Clone 0 options – this will launch another Unity editor with the same exact project, that will be the player during our tests.

Remember, that all changes done in the main editor, will be automatically applied in all clones (after saving - preferably by Ctrl-S), which will make game testing and debugging much easier.

With 2 editors open (root and clone), we need to specify which of those is the server, and which is the client. To do that, let's launch Elympics Config by going to Tools -> Elympics -> Select or create Config.

In that inspector window you should see one ElympicsConfig with all its settings. After scrolling to the bottom, make sure that Mode is selected as Half Remote, and Player 1 should have Is Bot option checked.

Change to half remote

So: let's set the main editor as Server in half-remote mode.

The second editor (Player 0), edit the same settings and set it as player, and connect to your loopback IP (the same as in the screenshot below):

Static options set for half remote

Player 1 should be set as bot, so that we're able to start the game with only one player. Alternatively, you can create another editor clone and launch it as the second player.

That's it! We should be able to run our game! 🎉

First, start Play mode in the editor that was configured as the server. Once it starts, do the same in the clone editor (player). The two instances are connected, and you can debug the game state as it's being actively synchronized between instances of the Editor, in a very similar way to the production environment.