Skip to content

Commit b2febd1

Browse files
author
Unity Technologies
committed
## [1.5.0] - 2025-04-22 ### Added * The `AutomaticThinClientWorldsUtility` class, which facilitates runtime creation (and management) of thin clients. It is available to user-code, and when in `PlayType.Server`. * `ClientTickRate.NumAdditionalClientPredictedGhostLifetimeTicks`, which can be used to fine-tune/alleviate a common issue where **correctly predicted** client predicted spawns are de-spawned by the netcode package **before** they have an opportunity to be classified against their server-side counterparts, which is a common occurrence when said spawns replicate later than expected (which can happen for a variety of reasons). The default behaviour is to have them despawn if they have not been classified by the `NetworkTime.InterpolationTick`. This value extends this threshold by this many additional ticks. However, if ghosts are frequently unable to replicate by the `NetworkTime.InterpolationTick`, then your interpolation buffer may be too small. I.e. Consider tweaking `ClientTickRate.InterpolationTimeMS` (or the `InterpolationTimeNetTicks` equivalent) first. For further reading, refer to the [interpolation docs here](Documentation~/interpolation.md). * Exposed the `k_TickPeriod` range constant (defaulting to `±5 ticks`) in the default classification system as `ClientTickRate.DefaultClassificationAllowableTickPeriod`. This may help fix esoteric default classification related errors, particularly when the server is frequently batching ticks (leading to large tick deltas). That said; prefer writing your own classification system, which can take advantage of project-specific `GhostField` data to more accurately classify predicted spawns. * `ClientServerBootstrap.AllNetCodeWorldsEnumerator` and `ClientServerBootstrap.AllClientWorldsEnumerator` helpers. * Doc on gotcha with custom template serialization and byte alignment. * Tests (and a packet dump entry & warning log) covering the case where clients are impacted by the unfathomably rare `MaxBaselineAge` edge-case. * FixedList replication support for RPC, Command, and components (IComponentData, IBufferElementData, IInputComponentData). Some limitation apply, see the doc for further info. * unsafe fixed buffer replication support for RPC, Command, and components (IComponentData, IBufferElementData, IInputComponentData). Some limitation apply, see the doc for further info. * GhostAuthoringComponent.UseSingleBaseline`, denoting that this prefab type should force 'single baseline' delta-compression during serialization, which can lead to significant CPU savings at the cost of marginally increased bandwidth consumption, particularly for ghosts with many components, and/or with many GhostField's which rarely change. * new templates for serializing bytes and short using 8 and 16 bits instead of a full 32 bit data, when they are sent uncompressed. * Static-optimized ghosts now report their `CanUseStaticOptimization` (CUSO) status to the packet dump (including the `ComponentType` of the first detected changed version), which should aid debugging efforts. * Broad packet dump data improvements, at the cost of worsened server performance when enabled. * missing documentation in regards what are the fields types for which prediction errors are reported. * Documentation and test coverage regarding the `GhostGroup` feature. * Test and doc coverage of `[GhostField]` C# unions (via `[StructLayout(LayoutKind.Explicit)]`), which are supported (with many caveats). * Test coverage of `NetworkStreamSnapshotTargetSize`, UTP's `MaxMessageSize`, and `GhostSystemConstants.MaxSnapshotSendAttempts`. ### Changed * **Behaviour Breaking Change:** The client will now ignore the `HandshakeApprovalTimeoutMS` until it has completed the `Handshake` phase, as it should respect this servers value, rather than assuming its own. Relatedly: Be aware that client worlds will not fetch the `ClientServerTickRate` values from a `NetCodeConfig.Global` config, they will only accept values sent to it by the server during handshake. * **Behaviour Breaking Change:** The `AddCommandData` method will now reject inputs with `Invalid` Tick values, preventing runtime exceptions in rare cases. * **Behaviour Breaking Change:** The `DefaultDriverConstructor` no longer removes the IPC driver when `RequestedPlayType == Server`, as thin clients can now be instantiated on DGS builds (assuming supported by user-code). * **Value Breaking Change:** Increased the Lag Compensation Physics `CollisionWorld` history buffer capacity from 16 ticks to 32 ticks, as the previous buffer was too small for some use-cases. However, the default value (when using `LagCompensationConfig.ServerHistorySize:0`) remains at 16. Increasing this will allocate more collision worlds, increasing the memory consumption on the `ServerWorld`, particularly with very large physics scenes, and therefore should only be done if you intend to support high-ping players (i.e. you're often seeing `PhysicsWorldHistorySingleton.GetCollisionWorldFromTick` clamp a clients history to the last/oldest stored value). Also note the change to the public const `PhysicsWorldHistory.RawHistoryBufferMaxCapacity` (from 16 to 32).
1 parent 2215039 commit b2febd1

File tree

418 files changed

+12420
-9840
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

418 files changed

+12420
-9840
lines changed

.signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":1741865803,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dWem5QTkVMenFkVmdEbFhpb2VpUnV6OERKWFgvblpmU1JWKytwbk9ySTRibG4KS0twelJlNW14OTc1SjhxZ1FvRktKT0NNRlpHdkJMR2MxSzZZaEIzOHJFODZCZzgzbUovWjBEYkVmQjBxZm13cgo2ZDVFUXFsd0E5Y3JZT1YyV1VpWXprSnBLNmJZNzRZNmM1TmpBcEFKeGNiaTFOaDlRVEhUcU44N0ZtMDF0R1ZwCjVNd1pXSWZuYVRUemEvTGZLelR5U0pka0tldEZMVGdkYXpMYlpzUEE2aHBSK0FJRTJhc0tLTi84UUk1N3UzU2cKL2xyMnZKS1IvU2l5eEN1Q20vQWJkYnJMbXk0WjlSdm1jMGdpclA4T0lLQWxBRWZ2TzV5Z2hSKy8vd1RpTFlzUQp1SllDM0V2UE16ZGdKUzdGR2FscnFLZzlPTCsxVzROY05yNWdveVdSUUJ0cktKaWlTZEJVWmVxb0RvSUY5NHpCCndGbzJJT1JFdXFqcU51M3diMWZIM3p1dGdtalFra3IxVjJhd3hmcExLWlROQWdNQkFBRT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg"}

CHANGELOG.md

Lines changed: 55 additions & 40 deletions
Large diffs are not rendered by default.

Documentation~/TableOfContents.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@
55
* [Network protocol checks](network-protocol-checks.md)
66
* [Creating multiplayer gameplay](creating-multiplayer-gameplay.md)
77
* [Connecting server and clients](network-connection.md)
8-
* [Communicating with RPCs](rpcs.md)
98
* [Synchronizing states and inputs](synchronization.md)
10-
* [Ghost synchronization](ghost-snapshots.md)
11-
* [Ghost spawning](ghost-spawning.md)
12-
* [Commands](command-stream.md)
9+
* [Synchronization with ghosts](ghosts.md)
10+
* [Ghosts and snapshots](ghost-snapshots.md)
11+
* [Serialization and synchronization with `GhostFieldAttribute`](ghostfield-synchronize.md)
12+
* [Customizing replication with `GhostComponentAttribute`](ghostcomponentattribute.md)
13+
* [Creating replication schemas with `GhostComponentVariationAttribute`](ghost-variants.md)
14+
* [Spawn and pre-spawn ghosts](ghost-spawning.md)
15+
* [Ghost type templates](ghost-types-templates.md)
16+
* [Ghost groups](ghost-groups.md)
17+
* [Communication with RPCs](rpcs.md)
18+
* [Use the command stream to handle inputs](command-stream.md)
1319
* [Time synchronization](time-synchronization.md)
1420
* [Interpolation](interpolation.md)
1521
* [Prediction](prediction.md)
@@ -19,15 +25,6 @@
1925
* [Prediction switching](prediction-switching.md)
2026
* [Prediction edge cases and known issues](prediction-details.md)
2127
* [Physics](physics.md)
22-
* [Host migration](host-migration/host-migration.md)
23-
* [Introduction to host migration](host-migration/host-migration-intro.md)
24-
* [Host migration API and components](host-migration/host-migration-api.md)
25-
* [Add host migration to your project](host-migration/add-host-migration.md)
26-
* [Host migration requirements](host-migration/host-migration-requirements.md)
27-
* [Host migration systems and data](host-migration/host-migration-systems.md)
28-
* [Lobby and Relay integration](host-migration/lobby-relay-integration.md)
29-
* [Limitations and known issues](host-migration/host-migration-limitations.md)
30-
* [Ghost type templates](ghost-types-templates.md)
3128
* [Testing and debugging your game](debugging.md)
3229
* [Logging](logging.md)
3330
* [Using the PlayMode Tool](playmode-tool.md)
@@ -39,7 +36,6 @@
3936
* [Data compression](compression.md)
4037
* [Samples](samples.md)
4138
* [Networked cube](networked-cube.md)
42-
* [Host migration in Asteroids](host-migration/host-migration-sample.md)
4339
* [Reference](reference.md)
4440
* [Netcode-specific components and types](entities-list.md)
4541
* [Netcode Project Settings reference](project-settings.md)

0 commit comments

Comments
 (0)