Commit Graph

164 Commits

Author SHA1 Message Date
louisphilippe seguin
a1f33f67ee Iris
* NetGroupHandles are now unique and cannot reference a future unrelated group once the group it referenced has been destroyed.

#jira UE-207640

[CL 34420714 by louisphilippe seguin in ue5-main branch]
2024-06-17 10:24:22 -04:00
mattias hornlund
84cc918620 Iris
- FReplicationWriter::UpdateDirtyGlobalLifetimeConditionals now marks subobject owner dirty - now fixed to not cause bad state transitons
- Added test for previouse bad case.
- Changed checks to ensures to avoid taking down server

#rb Peter.Engstrom

[CL 34420568 by mattias hornlund in ue5-main branch]
2024-06-17 10:23:27 -04:00
ryan gerleve
e5fc7229a0 Add a new gracefully-closing state to NetConnection that waits for reliable data to be acknowledged before actually closing communication, and support this in Iris.
This helps make sure reliable client RPCs sent right before the server gracefully disconnects a client by destroying their PlayerController are received, especially under packet loss.
Can be disabled by setting the cvar net.GracefulCloseEnabled.

#rb LouisPhilippe.Seguin, Peter.Engstrom

[CL 34379986 by ryan gerleve in ue5-main branch]
2024-06-14 14:58:36 -04:00
peter engstrom
3b170dc9ba Iris - Fixed bug with object scope hysteresis kicking in for newly added objects. Fixed bug with NetRefHandleIndex growing caused some filtering information to be reset.
#rb bradley.heath, matt.harris

[CL 34372137 by peter engstrom in ue5-main branch]
2024-06-14 11:11:21 -04:00
peter engstrom
c58210fbb6 Iris - Fixed compile errors due to AutomationTest API changes.
#rnx
#rb mattias.hornlund

[CL 34333542 by peter engstrom in ue5-main branch]
2024-06-13 04:09:40 -04:00
louisphilippe seguin
6f68a6d233 Iris
* CreateGroup public API now requires an FName
* Passing NAME_None will let Iris autogenerate an unique name to the group (not recommended)
* Ensure and don't create a group if a valid name was passed but it's not unique
* Improve LogIrisFiltering verbose logs to output group names

#jira UE-207640
#rb Peter.Engstrom

[CL 34321357 by louisphilippe seguin in ue5-main branch]
2024-06-12 16:19:04 -04:00
mattias hornlund
cf59f13030 Iris
- Fixed failed test due to changes to validate function

#rb Peter.Engstrom

[CL 34303448 by mattias hornlund in ue5-main branch]
2024-06-12 07:21:36 -04:00
peter engstrom
fe9b367419 Iris - NetObjectCountLimiter test for Fill mode.
#rnx
#rb mattias.hornlund

[CL 34277669 by peter engstrom in ue5-main branch]
2024-06-11 11:07:23 -04:00
louisphilippe seguin
99652954c1 Iris
* Added ConsumeNetMetrics to ActorReplicationBridge.
* It can be used to collect internal Iris metrics and send them to an AnalyticsProvider

#rnx
#rb Mattias.Hornlund

[CL 34205110 by louisphilippe seguin in ue5-main branch]
2024-06-07 11:54:05 -04:00
peter engstrom
d25141ac13 Iris - FieldOfViewNetObjectPrioritizer and tests.
The prioritizer consists of an inner sphere, outer sphere, a cone and a line of sight. Radii, field of view for cone, line of sight width and priorities are all configurable. Priorities cover the shape they're configured for except for the cone where the priority is linearly interpolated from the inner cone length to the full cone length. A 2D greyscale image is produced to memory by the VisualizeFieldOfViewNetObjectPrioritizer test.

#jira UE-216561
#rb Mattias.Hornlund

[CL 34123123 by peter engstrom in ue5-main branch]
2024-06-05 09:47:12 -04:00
peter engstrom
c2c456912e Iris - Minor test framework improvements.
#rnx
#rb bradley.heath

[CL 34087828 by peter engstrom in ue5-main branch]
2024-06-04 03:39:03 -04:00
mattias hornlund
4f42ed9651 iris
- Fixed issue with Torned-off objects being destroyed while waiting for initial acknowledgement.

#rb Peter.Engstrom
[REVIEW] https://p4-swarm.epicgames.net/reviews/33968061

[CL 33984539 by mattias hornlund in ue5-main branch]
2024-05-29 15:53:36 -04:00
mattias hornlund
a64c59840b Iris
- Fixed case where flush of reliable rpcs to objects not yet acknowledged by clients would be ignored.

#rb Peter.Engstrom

[CL 33832493 by mattias hornlund in ue5-main branch]
2024-05-22 12:00:58 -04:00
mattias hornlund
d5b3df3626 Iris fixed crash when destroying rpc parameters
- ReplicationDescriptorBuilder now verifies traits accumulated from struct members against traits on struct/property itself when generating descriptor.

#rb Peter.Engstrom

[CL 33825551 by mattias hornlund in ue5-main branch]
2024-05-22 07:59:02 -04:00
louisphilippe seguin
f9b17563d9 NetBitArray
* Added safer ways to access internal buffers held by a FNetBitArray and FNetBitArrayView
* GetWord() can be used to safely access the full 32bit value to modify 32bit entries at once.
* GetDataChecked(NumWordSize) can be used to access the raw array buffer but will also validate that the maximum word iteration count is within the bounds of the NetBitArray
* Reset() has been deprecated in favor of ClearAllBits()

Iris
* Replaced usage of deprecated NetBitArray::Reset
* Replaced a few usages of unsafe GetData() with safer GetWord and GetDataChecked
* Replaced Reset with ClearAllBits

[CL 33692839 by louisphilippe seguin in ue5-main branch]
2024-05-16 13:31:10 -04:00
louisphilippe seguin
772ebd5274 Iris
* Added Unit test for Growing netbitarray operation

#rnx
#rb Peter.Engstrom

[CL 33691754 by louisphilippe seguin in ue5-main branch]
2024-05-16 12:55:44 -04:00
peter engstrom
1954829a56 Added missing pragma once.
#rnx
#rb mattias.hornlund

[CL 33653979 by peter engstrom in ue5-main branch]
2024-05-15 06:50:57 -04:00
louisphilippe seguin
e89a87acde Iris
* Support runtime NetBitArray reallocations when maximum replicated object count is hit.
* FReplicationSystemParams can now configure an initial size for netobjet lists that can grow up to the MaxReplicatedObjectCount when the initialize size is all assigned to registered netobjets.
* Use InitialNetObjectListCount to set the initial list size.
* Use NetObjectListGrowCount to set by how many indexes we grow and realloca all netobject lists.
* Hitting the maximum active replicated object limit will now cause a fatal error and kill the process.

NetDriver
* Split Iris config into two structs: ReplicationSystemConfigClient and ReplicationSystemConfigServer

#rb bradley.heath, Peter.Engstrom

[CL 33647879 by louisphilippe seguin in ue5-main branch]
2024-05-14 22:04:11 -04:00
peter engstrom
0152f02ab9 Iris - Fixed GC error during test.
#rb mattias.hornlund

[CL 33491959 by peter engstrom in ue5-main branch]
2024-05-07 15:39:11 -04:00
peter engstrom
ca9b8ecf35 Iris - Object scope hysteresis support. Keep dynamically filtered out objects around for a specified amount of frames. Configure behavior via hysteresis profiles that determine the frame timeout per class. The filter config for a specific class can then mention the hysteresis profile in order to get the appropriate behavior. Config example is present in ReplicationFilteringConfig.h
Note: Hysteresis is enabled by default with a frame count of 6, configured in BaseEngine.ini.

#jira UE-209773
#rb LouisPhilippe.Seguin, Mattias.Hornlund

[CL 33491062 by peter engstrom in ue5-main branch]
2024-05-07 15:01:41 -04:00
louisphilippe seguin
289740f793 Iris
* NetObjectFilter now owns the FilteredObjects list
* NetObjectFilter's now need to set the NeedsUpdate trait if they want to receive UpdateObjects callback telling them of dirty objects
* NetObjectFilter::UpdateObjects is no longer pure virtual
* NetObjectFilter's OnInit params is now const
* Added some safety tests by using ArrayView's instead of raw buffers

#rb Peter.Engstrom

[CL 33431067 by louisphilippe seguin in ue5-main branch]
2024-05-03 14:13:25 -04:00
mattias hornlund
c69dfc359e Iris
- Implemented support for capturing and caching CreationInfo which allows us to capture final snapshot of replicated objects data including information we need to send creation info to clients. This allows flushing of replicated state and rpcs even if the owning actor is destroyed.
 - Iris now supports flushing state for Networked objects created and destroyed during the same frame.
 - Autoflush behavior can be disabled by cvar net.Iris.EnableFlushReliableRPCOnDestroy 0

#rb Peter.Engstrom

[CL 33258927 by mattias hornlund in ue5-main branch]
2024-04-26 05:10:23 -04:00
guillaume arruda
afe7829aae [Backout] - CL33195688
[FYI] Peter.Engstrom
Original CL Desc
-----------------------------------------------------------------
Iris - Object scope hysteresis support.  Keep dynamically filtered out objects around for a specified amount of frames. Configure behavior via hysteresis profiles that determine the frame timeout per class. The filter config for a specific class can then mention the hysteresis profile in order to get the appropriate behavior.  Config example is present in ReplicationFilteringConfig.h
Note: Hysteresis is enabled by default with a frame count of 6.

#jira UE-209773
#rb LouisPhilippe.Seguin

[CL 33202472 by guillaume arruda in ue5-main branch]
2024-04-24 12:23:39 -04:00
peter engstrom
694fa723a7 Iris - Object scope hysteresis support. Keep dynamically filtered out objects around for a specified amount of frames. Configure behavior via hysteresis profiles that determine the frame timeout per class. The filter config for a specific class can then mention the hysteresis profile in order to get the appropriate behavior. Config example is present in ReplicationFilteringConfig.h
Note: Hysteresis is enabled by default with a frame count of 6.

#jira UE-209773
#rb LouisPhilippe.Seguin

[CL 33195732 by peter engstrom in ue5-main branch]
2024-04-24 06:37:54 -04:00
peter engstrom
d4d16327b3 Iris - Remove fragment NetObjectFilter type. The complexity of adding new functionality to filtering is becoming too great when everything needs to support multiple filtering passes.
#rb LouisPhilippe.Seguin

[CL 33065481 by peter engstrom in ue5-main branch]
2024-04-18 03:32:18 -04:00