This document is about: FUSION 2
SWITCH TO

Fusion Starter

Level 4

Fusion Starter

Overview

Fusion Starter is an entry-level game sample designed for testing and learning about Fusion, and enjoying multiplayer gameplay with friends and colleagues.

Platformer Screenshot

The project consists of a series of small, independent examples. Each example has its own folder and namespace. Currently, there are three examples available:

Fusion Starter is designed with a simple approach and understandable code in mind. All scripts are thoroughly commented to aid understanding. It is therefore accessible for beginners while still respecting Fusion best practices. Test how everything stays butter-smooth even under poor networking conditions.

This sample has two versions: a Host Mode version (Client/Server topology) and a Shared Mode version.

Download - Host Mode

Version Release Date Download
2.0.2 Aug 21, 2024 Fusion Starter - Host Mode 2.0.2 Build 630

Download - Shared Mode

Version Release Date Download
2.0.2 Aug 21, 2024 Fusion Starter - Shared Mode 2.0.2 Build 631

Host Mode vs Shared Mode

Host Mode is a version of the Client/Server topology where one client acts as a server. In this setup, the server has authority over all game objects. Clients use client-side prediction and server reconciliation (rollback and resimulation loop) to provide immediate reactions to their input actions, rather than waiting for a server response.

In Shared Mode, clients have authority over their own objects, eliminating the need for client-side prediction and server reconciliation. This absence of prediction, rollback and resimulation loop makes Shared Mode more accessible for beginners. RPCs are much more frequent in this mode, especially when players interact with other players or neutral objects (requesting changes of properties on objects that the client does not have authority over - e.g., dealing damage, collecting coins). Since clients have authority over their objects, Shared Mode is more prone to cheating, making it more suitable for casual games. Shared Mode is recommended for mobile/web platforms or scenarios with very high player counts (e.g., MMO). Security in Shared Mode can be enhanced with a custom server plugin.

For more information regarding different Fusion modes and when to use each, please check the Fusion Introduction page.

💡Note: Although Host Mode is designed for client/host connections, the code remains the same when running the game on a dedicated server. To test this, simply change the starting arguments in the UIGameMenu script.

Preparation Guide

It is recommended to have a basic understanding of Fusion and to have completed the Host Mode Basics or Shared Mode Basics tutorial before diving into this sample.

Requirements:

  • Unity 2022.3
  • Fusion AppId: To run the sample, first create a Fusion AppId in the PhotonEngine Dashboard and paste it into the App Id Fusion field in Realtime Settings (reachable from Tools/Fusion/Realtime Settings menu). Continue with instructions in Starting The Game section.

Project Organization

Project is structured as a set of three small independent examples.

/00_MainMenu Main menu scene
/01_ThirdPersonCharacter Third Person Character example
/02_Platformer Platformer example
/03_Shooter Shooter example
/Common Prefabs, scripts and graphical assets common to all examples

Starting The Game

Each example within Fusion Starter is accessible via its own scene file, which can be opened and played directly. Alternatively, all examples can be launched from the MainMenu scene located at /00_MainMenu/00_MainMenu.

Main Menu Scene

Upon starting the game, a small game menu appears where players can enter a nickname or a session name (also known as a room name). Clicking the Start Game button will initiate a new game session, or connect the player to an already existing game.

Game Menu

For navigation:

  • Use the W, S, A, D keys for movement.
  • Use the Shift key for sprint and the Space key for jump.
  • Use the mouse for looking around.
  • Use Left mouse button for weapon fire (only in the Shooter example)
  • Press the Esc key to open the game menu during play.

1 - Third Person Character

Third Person Character

The Third Person Character sample is a conversion of the Starter Assets - Third Person provided by Unity into a multiplayer environment. Players can spawn as third-person characters, walk, and run around in a prototype environment. Instead of using the default CharacterController component, this example uses the Simple KCC addon to drive player movement. The Simple/Advanced KCC addon is our kinematic character controller (KCC) solution specifically tailored for Fusion. It provides butter-smooth movement and rotation even under the most challenging networking conditions while being highly optimized to handle dozens or even hundreds of characters on a single CPU server core.

Where to go next

To learn more about character animation, head over to the Animations technical sample. For insights into character movement, you can explore the Simple KCC Sample or dive deeper with the Advanced KCC Sample. The third person character controls and tick-based animations are also part of our largest sample, the BR200. However, this sample is considered Advanced/Expert level, so it's recommended to tackle it once you feel comfortable with Fusion.

2 - Platformer

Platformer

The Platformer example builds on a similar foundation as the Third Person Character example and adds interaction with game objects (e.g., coins, falling platforms), usage of RPCs (e.g., nameplates above player heads), and a simple game loop where players race to collect 10 coins and reach the top flag. After each round, all players are restarted back to the starting point.

Where to go next

Check out our comprehensive Multi Climb Tutorial series, which covers similar platformer basics but progresses to an Advanced KCC addon, implements movement abilities, and features a complete game loop. Be sure to explore the Simple KCC Sample and the Advanced KCC Sample for the ultimate guide to character movement and movement affectors (jump pads, force fields, surfaces, etc.). For a 2D platformer, take a look at the Razor Madness sample.

3 - Shooter

Shooter

The Shooter example showcases a simple first-person shooter. Players compete to be the best hunter by shooting flying chickens. The chicken counter resets when a player dies, either by falling from a platform or being killed by another player. This example (in Host Mode) uses Fusion's Lag Compensation to ensure that hitting chickens and other players is precise even under poor networking conditions. In Shared Mode, the clients make decisions about their hits locally and inform other clients to apply damage to themselves (check RPC_TakeHit in Health.cs script).

Where to go next

Since shooters are the most popular multiplayer genre, we provide plenty of resources to jumpstart your shooter games development journey. The Projectiles Essentials technical sample is essential for learning about different ways to network projectiles in Fusion and understanding the advantages and disadvantages of particular approaches. Simple FPS is a natural evolution of this example — it provides a complete game loop, ammo handling, various weapons, pickups, player statistics and leaderboards, and integration with the Fusion Menu. Projectiles Advanced offers solutions for all kinds of projectiles, including homing projectiles, ricocheting projectiles, grenades, spray projectiles, and many others, while also addressing more advanced real-world challenges in building multiplayer shooters. Our largest sample, BR200, focuses on large player counts and advanced techniques like tick-accurate animations and sub-tick accurate shooting.

3rd Party Assets

The Fusion Starter sample is built around several awesome third party assets:

Please read the UCL license terms carefully before downloading and using the asset.

Back to top