Getting Started
In the further course of this documentation and especially in network-related chapters, you will find additional window tabs for Netcode or Photon. These are specifically directed at a networking solution, so you only have to read the one that is relevant to you.
- Netcode
- Photon
I'm a Unity Netcode tab!
I'm a Photon tab!
Playing the Game
Open the Intro scene, and press the Play button! It throws the player directly in an online game via matchmaking. Since the asset is developed with the mobile target audience in mind, this was a design decision in order to achieve the lowest friction when trying to join a game. A lobby, or waiting counter where players first have to meet up and do nothing for a while, would not work out well for this audience.
Since it is a bit boring to play without seeing any enemy, make a local build and launch both the Unity Editor and that build!
Overview of Network approaches
For quick access, you can find a list of different network approaches used for a specific aspect or demonstration purposes in the table below.
If you are unexperienced with networking or trying to get familiar with the asset in general, I would recommend not using the direct links below, but going over the sections in the sidebar from top to bottom one by one.
Network Technique | Use Case | Section |
---|---|---|
Network Components | Making use of built-in components that are shipped with the network package. | Movement |
Network Variables | Synchronizing single values between clients. | Properties |
Remote Procedure Calls | Executing methods on the server or clients. | Shooting |
Network Lists | Synchronizing lists of values between clients. | Game Manager |
Network Structs / Buffered RPCs | Managing a single persistent entry per object and informing new clients about it. | Collectibles |
Game Modes
This asset features two playable game modes: Team Deathmatch and Capture The Flag. Each game mode has a separate matchmaking queue, as explained in Matchmaking.
If you would like to create a completely new game mode, first you have to define it in the GameManager
enumeration named GameMode
.
Within the specified game mode, the map loaded is random. In order to assign maps to that game mode for matchmaking, your scene names have to follow the GameMode
naming convention. For example, when adding a new Team Deathmatch map, the scene should start with the existing game mode prefix "TDM".
In addition, only scenes are chosen which are added and active in Unity's Build Settings. This allows for testing new maps without affecting live builds. Finally when in the scene, select the GameManager
inspector and choose the GameMode
dropdown value the map was designed for.
Team Deathmatch
In addition to general game mechanics, this mode includes the follow features:
- 4 teams
- bullet powerups
- shield powerup
Capture The Flag
In addition to general game mechanics, this mode includes the follow features:
- 2 teams
- bullet powerups
- collectible flag
- collectible home base
- scoring with flag returns