Multiplayer Setup

MAGES SDK provides collaborative sumulations out-of-the-box through an easy-to-use multiplayer interface.

../../_images/coop.png

The applications created with the MAGES SDK automatically work in collaborative environments without any additional work. In this way, you can join in the same room with your colleagues to complete a scenario.

Import Photon

  1. In the MAGES panel, navigate to the Configuration Tab

  2. Fix the issue releated to Photon Unity networking in order to be able to create coop sessions.

    ../../_images/fix_photon_multiplayer.png
  3. A window will open in your browser, make sure to add Photon to your Assets.

    ../../_images/add_photon_to_assets.png
  4. Navigate to Window > Package Manager. Make sure you are in your Assets, Download and Import PUN 2.

    ../../_images/pun2_import.png

Create a Photon App ID

  1. Open your browser and enter the Photon website.

  2. Create a Photon account. If you already have one just login using your Photon credentials.

  3. Enter the Photon Dashboard, located on the top right corner of the page.

    ../../_images/photon_site.png
  4. Click on the CREATE A NEW APP button.

    ../../_images/photon_create_new.png
  5. Select Pun as the Photon SDK, fill in the rest of the details and click the CREATE button.

    ../../_images/photon_details.png
  6. This will create a new Photon Cloud App. Navigate back to your photon apps and copy the App ID of your app.

    ../../_images/photon_id.png
  1. Open your Unity project and navigate to Window > Photon unity Networking > PUN Wizard.

    ../../_images/window_navigate_photon.png
  2. Click on Setup Project.

    ../../_images/pun_wizard_setup_project.png
  3. Insert your App ID in the PUN Setup and you are done. You can now host or join sessions.

    ../../_images/pun_wizard_appid.png

Start a MAGES application

  1. Start a MAGES application. You can use any device you like (VR, desktop or mobile).

  2. From the initial menu select the MULTIPLAYER option.

    ../../_images/select_multiplayer.png
  3. Wait until the connection to the server is established.

    ../../_images/wait_connection.png

How to host a Session

  1. Once the connection to the server is established, if you want to host a Session select CREATE SESSION.

    ../../_images/host_session.png
  2. You are done. You are now hosting a session other players can join.

    ../../_images/hosting_complete.png

How to join a Session

  1. Once the connection to the server is established, pick one of the available sessions someone else has hosted and select JOIN SESSION.

    ../../_images/join_session.png
  2. You are done. You have succesfully joined a Session.

    ../../_images/joined_successfully.png

Start the Session

When all the users have joined the room, the host should click on the START SESSION button to start the simulation.

../../_images/start_session_host.png