You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* Removed deprecated or dead code paths * Simplified build system setup for physics support * Deprecated build system flags and unsupported macros #jira none #rb Chris.Caulfield, Kriss.Gossart #preflight 62963ec0fe779f23c8ea0c5e [CL 20450744 by Benn Gallagher in ue5-main branch]
// --------------------------------------------------------------------------------------------------------------------
// Network Prediction Plugin
// --------------------------------------------------------------------------------------------------------------------
After a long road and many attempts, we are dropping support for the async version of Network Prediction. We felt the
complications it introduced into the physics system were too much to maintain and performance was still too poor in
the worst/degenerate cases that it wasn't going to be a viable system for enough games to warrant the complexities.
The original single threaded version of Network Prediction is preserved and unchanged. We still hope to use it to
build a new character moverment system with it. Physics support could come back into this version but it would be
strictly opt in and only applicable to games with small number of objects and players.
// -------------------------------------------------------------
// System Overview
// -------------------------------------------------------------
NetworkPrediction is a generalized system for client-side prediction. The goal here is to separate the gameplay code
from the networking code: prediction, corrections, resimulates, etc.
The core of the system is user states and a SimulationTick function. User states are divided into three buckets. These
are implemented as structs:
InputCmd: The state that is generated by a controlling client.
SyncState: The state that primarily evolves frame-toframe via a SimulationTick function.
AuxState: Additional state that can change but does .
Given these state types, user then implements a SimulationTick function which takes an input {Inputcmd, Sync, Aux} and
produces output {Sync, Aux}. These inputs and outputs are what is networked.
An event system, called Cues, is also available for managing non simulation affecting events that are emitted during
the SimulationTick. Prediction and rollback support is generically provided for these.
NetworkPredictionExtras is a supplementary plugin with sample content.
// -------------------------------------------------------------
// Getting Started
// -------------------------------------------------------------
MockNetworkSimulation.h - entry point for simple example use case. See how a simple simulation is defined and how an
actor component is bound to it at runtime.
NetworkPredictionWorldManager.h - top level entry point for the system. See what happens each frame, how simulations
are managed and coordinated.
NetworkPredictionPhysicsComponent.h - Example of binding a physics-only sim.
MockPhysicsSimulation.h - Simple "controllable physics object" example.