Quickstart
Project Setup
To run the sample, the Fusion App Id needs to be assigned in the PhotonAppSettings
.
First, create a Fusion App Id in the Photon Engine Dashboard and paste it into the App Id Fusion
field in the PhotonAppSettings
(reachable from the Fusion/Realtime Settings
menu or directly modifying file Assets/Photon/Fusion/Resources/PhotonAppSettings.asset
).
Starting The Game
Menu Start
Open the Menu
or Loader
scene in Assets/TPSBR/Scenes
and hit Play
.
Join an existing game or create a new one by hitting the Create Game
button. The Quick Play
button works only with the Multiplay platform.
Gameplay Debug Start
You can play any gameplay scene directly. The Standalone Manager
GameObject in the scene determines the type of game started. Standalone Manager
values can be changed to run the game in a preferred configuration.
To start the game with multiple players in a single editor check the Multipeer Mode section.
Controls
Key | Action |
---|---|
W,S,A,D | Move |
SPACE | Jump / Thrust with jetpack |
1,2,3 | Switch weapons |
4 | Cycle grenades |
Q | Fast weapon switch |
F | Interact / Drop weapon (hold) |
X | Toggle jetpack |
E | Toggle camera side |
Left Mouse Button | Fire |
Right Mouse Button | Aim |
Enter | Lock/unlock cursor (Editor only) |
~ | Toggle fast movement (Editor only) |
Running The Server
You can start Fusion BR from the command line as a headless server instance.
Command Line Arguments
Argument | Description |
---|---|
-host | Starts host |
-dedicatedServer | Starts dedicated server |
-client | Starts client(s) |
-deathmatch | Starts deathmatch gameplay mode (valid for server/host only) |
-elimination | Starts elimination gameplay mode (valid for server/host only) |
-battleRoyale | Starts battle royale gameplay mode (valid for server/host only) |
-region [STRING] | Custom Photon region (optional), eu/us/usw/... |
-extraPeers [INT] | Additional clients started within same process |
-serverName [STRING] | Custom server name shown in game list |
-maxPlayers [INT] | Max players allowed to join the game |
-sessionName [STRING] | Custom session identifier |
-lobby [STRING] | Custom matchmaking lobby name |
-scene [STRING] | Which scene should be loaded (GenArea2|GenArea3|GenArea5|GenArea7) |
-stripped | Enables extra runtime optimizations to maximize batch client count handled by single process |
-ip | Custom IP address the server binds to |
-port | Custom port the server binds to |
-fps [INT] | Sets Application.targetFrameRate to a given value |
-moderator | Starts the game with moderator rights (can control creating game and moderating in public builds) |
-dataPath | Custom output directory path |
-recordSession | Record logs and performance stats for current session |
-generateInput | Generates random input, used only in combination with -stripped |
-multiplay | Activates Multiplay Manager |
-backfill | Use Backfill service (joining players to existing matches, server only) |
-sqp | Use Server Query Protocol (SQP) |
-matchmaking | Use Unity Matchmaker |
-queueName [STRING] | Custom Matchmaker queue name |
Examples of local headless server command line arguments:
FusionBR.exe -batchmode -nographics -dedicatedServer -logFile BattleRoyaleServer.txt -battleRoyale -maxPlayers 200 -scene GenArea7
Multiplay
Fusion BR is prepared for hosting on the Multiplay platform. Follow the Multiplay guide included in the project.
Project Structure
Assets
Path | Description |
---|---|
3rdParty/ | Third-party assets |
Photon/ | Fusion libraries and addons |
TPSBR/ | Sample specific files, scripts and derived assets |
Extras.zip | Additional tools for profiling |
Scenes
Scene | Description |
---|---|
Loader | Initial scene, minimalistic (fast to load), checking command line arguments, loads to menu or a specific gameplay scene |
Menu | Default menu scene |
LoadingScene | Scene with a loading screen to fade between menu and gameplay scenes |
Game | Small static testing scene for debugging and feature iterations |
GameplayUI | Scene with separate gameplay UI, loaded additively |
GenArea2 | Small map for 20 players, generated at runtime |
GenArea3 | Medium map for 60 players, generated at runtime |
GenArea5 | Large map for 120 players, generated at runtime |
GenArea7 | Very large map for 200 players, generated at runtime |