This document is about: QUANTUM 3
SWITCH TO

Getting Started

Before diving into this sample, we recommend having a basic understanding of Quantum, see Quantum 3 Intro, and completing the Asteroids Tutorial first.

Project Setup

  1. Unzip the package from the Download page and open the project folder with Unity 6000.3.18f1.
  2. Create a Quantum 3 AppId following Creating a Quantum 3 AppId.
  3. Open Tools > Quantum > Find Config > Photon Server Settings and paste the AppId into the App Id Quantum field of the PhotonServerSettings asset.

Running in Editor

  1. Open the scene Assets/00_MainMenu/00_MainMenu.unity and enter Play Mode.
  2. Select THIRD PERSON CHARACTER, PLATFORMER or SHOOTER.
  3. Enter a room name and press Start Game.

To open an example directly, open Assets/01_ThirdPersonCharacter/01_ThirdPersonCharacter.unity, Assets/02_Platformer/02_Platformer.unity or Assets/03_Shooter/03_Shooter.unity and enter Play Mode. An empty room name joins a random room of the same example or creates a new one. For a quick offline test in the editor enable Force Local Mode on the UIGameMenu object of the scene, the game then starts in Local Mode without a connection.

Main menu
Main menu
Game menu
Game menu

Controls

Keyboard and Mouse

  • W, A, S, D or the arrow keys - Move
  • Mouse - Look around
  • Space - Jump
  • Left Shift - Sprint, Third Person Character and Platformer only
  • Left Mouse Button - Fire, Shooter only
  • Esc or Enter - Open or close the game menu

Gamepad

  • Left Stick - Move
  • Right Stick - Look around
  • South Button - Jump
  • Left Stick Press - Sprint, Third Person Character and Platformer only
  • West Button - Fire, Shooter only

Touch

The on-screen controls appear on mobile platforms. To test them in the editor, enable Force Mobile Controls on the UIGameMenu object of the scene.

  • Left half of the screen - Drag the stick to move
  • Right half of the screen - Drag to look around
  • Jump button - Jump
  • Double tap on the right half of the screen - Jump
  • Fire button - Fire, Shooter only
  • Menu button in the top left corner - Open or close the game menu

Building and Testing Multiplayer

The build settings of the project list the four scenes in this order: 00_MainMenu, 01_ThirdPersonCharacter, 02_Platformer and 03_Shooter. Keep the order, UIMainMenu loads the examples by build index and UIGameMenu returns to the main menu by loading build index 0.

Clients are only matched together when they use the same AppId, AppVersion and region and when they start the same example.

Multiplayer Play Mode

The project includes the Multiplayer Play Mode package, it runs up to three Virtual Players next to the main Editor without a build, see Multiplayer Play Mode.

  1. Open Window > Multiplayer > Multiplayer Play Mode and activate one or more Virtual Players.
  2. Enter Play Mode in the main Editor, the Virtual Players enter Play Mode with it.
  3. Pick an example and press Start Game in the main Editor, the Virtual Players join the same room.

After the main Editor connects, UIGameMenu sends the room name, the region and the build index of the example scene to the Virtual Players with a Quantum Multiplayer Play Mode command (MppmJoinCommand). Virtual Players that are still in the main menu or in another example load the example scene first. The room name can stay empty, the command carries the name of the room the main Editor joined or created.

If a Virtual Player cannot connect, try to close the Unity Editor, delete the Library/VP folder in the project and try again.

Last updated on

Back to top