Skip to content

Networking

RedEngine builds on Photon Fusion 2. Gameplay changes belong to Fusion ticks and authority rules; RedEngine supplies world ownership, player admission, scene travel, input routing, and focused gameplay modules around that simulation.

Execution model

  • Authority — State Authority admits players, loads network scenes, spawns actors, and commits state.
  • Prediction — Input Authority simulates supported gameplay ahead of server confirmation.
  • Replicated — network actor state, match state, scene information, timers, and ownership.
  • Local only — render interpolation, selected Multi-Peer view, camera, UI, particles, and audio.

Authority

  • State authority validates joins, spawns actors, applies damage, changes inventory, and advances match state.
  • Input authority supplies NetworkInputData for its controller and character.
  • Proxies render replicated state and local presentation without authoring gameplay outcomes.

Check authority at the boundary of a mutation, not inside every getter:

csharp
if (!Object.HasStateAuthority)
    return;

World.SpawnActor(projectilePrefab, muzzle.position, muzzle.rotation);

Travel and scenes

Use GameInstance.BrowseAsync to replace the current world. Use World.LoadSceneAsync and World.UnloadSceneAsync for synchronized additive levels inside the same match.

Deterministic time

Store gameplay deadlines as [Networked] TickTimer. TimerManager, coroutines, Task.Delay, and wall clock time are for local presentation only.

Player pipeline

Fusion join → authorization → controller spawn → OnPlayerJoined → spawn-point selection → character spawn. Customize the narrowest GameModeBase hook and keep network mutation on authority.

See GameInstance and Travel and GameMode Pipeline.

Next: Input.

RedEngine Framework documentation