Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetworkedController & SceneRewinder #37200

Closed
wants to merge 251 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
7922549
Added function to get current frame ID
AndreaCatania Mar 24, 2020
c047b80
Removed Node3D unused import, start integrating SceneRewinder
AndreaCatania Apr 3, 2020
925d968
SceneRewinder integration
AndreaCatania Apr 6, 2020
0089a16
Integrating scene rewinder
AndreaCatania Apr 7, 2020
6fa560f
Integrating SceneRewinder
AndreaCatania Apr 8, 2020
b2ee85e
Integrating SceneRewinder
AndreaCatania Apr 13, 2020
69cb532
Added snapshot parsing
AndreaCatania Apr 14, 2020
da34133
Integrated relative snapshot ID generation and parsing
AndreaCatania Apr 15, 2020
7c7182d
- Integrated snapshot search
AndreaCatania Apr 16, 2020
d618cfe
Rewinding integration
AndreaCatania Apr 17, 2020
191020d
Some fixes
AndreaCatania Apr 20, 2020
4feedd0
Improving rewinding
AndreaCatania Apr 20, 2020
95e4808
Integrating pretended processing
AndreaCatania Apr 21, 2020
3d72278
Fixed rewinding, Snapshot ID generation, and other things
AndreaCatania Apr 22, 2020
0193d19
Activated client aceleration mechanism
AndreaCatania Apr 22, 2020
940926e
Integrated controller pointer safety
AndreaCatania Apr 22, 2020
62198a6
Improved controller error message
AndreaCatania Apr 22, 2020
cedcd0f
Handled the case when the player can't accept new inputs
AndreaCatania Apr 22, 2020
3e32855
aa
AndreaCatania Apr 23, 2020
e154a00
Removed force notify
AndreaCatania Apr 23, 2020
0b09c04
Removed the old state check code from the controller
AndreaCatania Apr 23, 2020
771abaa
Removed the old state check code from the controller 2
AndreaCatania Apr 23, 2020
1e56ef7
Added explicit controller Registration API
AndreaCatania Apr 23, 2020
d845408
Some fixes
AndreaCatania Apr 23, 2020
cf0ba55
Re-enabled peer disabling updates
AndreaCatania Apr 23, 2020
21734ae
Some fixes
AndreaCatania Apr 23, 2020
13a37f0
Some other fix
AndreaCatania Apr 23, 2020
224716e
bb
AndreaCatania Apr 24, 2020
e9dd065
Added some warning reports and snapshot stringify. Improved snapshot …
AndreaCatania Apr 28, 2020
35581c3
Some renames and small code improvements
AndreaCatania Apr 28, 2020
a40092e
Added some in header docs
AndreaCatania Apr 29, 2020
c667182
Fixed some warnings
AndreaCatania Apr 29, 2020
e3ece41
Integrating a better doll rewinding system
AndreaCatania Apr 29, 2020
5e4f524
Decoupled dolls snapshots storage
AndreaCatania Apr 30, 2020
f1f2e49
Integrating snapshot comparison decoupling
AndreaCatania Apr 30, 2020
7542b7a
Changed mechansim to check snapshots, [Step 2/4]
AndreaCatania May 1, 2020
a5a2c6f
Fixed node sync
AndreaCatania May 5, 2020
4e990fb
Fixed crash
AndreaCatania May 5, 2020
4c0d94d
Fixed Doll Sync Error
AndreaCatania May 5, 2020
b46b787
Added Net print macro
AndreaCatania May 5, 2020
cd453ce
Added some safety check, Fixed bug with void function notification
AndreaCatania May 5, 2020
1170a7c
Improved code to store snapshot on client
AndreaCatania May 6, 2020
f659038
Fixed CI errors
AndreaCatania May 6, 2020
4707650
Get rid of last CI errors
AndreaCatania May 6, 2020
1c199fd
Changed mechansim to check snapshots, [Step 3/4] IsleRewinding integr…
AndreaCatania May 6, 2020
8f59334
Finishing isle rewinding [Broken]
AndreaCatania May 7, 2020
2a12e55
Integrated isle rewidning [4/4]
AndreaCatania May 8, 2020
3c8b4d2
Improved Recovery
AndreaCatania May 8, 2020
eacdcf1
Using OAHashMap
AndreaCatania May 8, 2020
733a73d
Added again server virtual lag recovery
AndreaCatania May 11, 2020
ffced8e
Added isle separation
AndreaCatania May 11, 2020
15b56d5
Fully use of isles processing
AndreaCatania May 11, 2020
cb1cfd4
Fixed isle checking
AndreaCatania May 12, 2020
8ff9789
Integrated separated processing and moved the additional speed back i…
AndreaCatania May 12, 2020
2df0eff
Diversification of scene rewinding process
AndreaCatania May 12, 2020
6245760
Integrated possibility to speedup/slowdown the doll processing depend…
AndreaCatania May 12, 2020
b5baa2e
Fixed crash
AndreaCatania May 13, 2020
92aadea
Get rid of callable_mp
AndreaCatania May 13, 2020
8b7a83f
Added Dictionary evaluation
AndreaCatania May 13, 2020
252066a
Better debug message during status check, Added possibility to detect…
AndreaCatania May 14, 2020
20ece0c
Fixed dictonary comparison and improved code style
AndreaCatania May 14, 2020
c25fde0
Removed dangling main_controller pointer and improved error message
AndreaCatania May 18, 2020
5dbc645
Make sure inputs are not processed till the first one arrives, dolls
AndreaCatania May 19, 2020
a231234
Improving snapshot parsing and removing the old hash map
AndreaCatania May 20, 2020
c966bc9
removed HashMaps
AndreaCatania May 20, 2020
787832d
Using the Vector<VarData> directly in the snapshot. Renamed some vari…
AndreaCatania May 20, 2020
ef6dabf
Removed useless variable
AndreaCatania May 20, 2020
3b2b5fe
Removed useless snapshot_id
AndreaCatania May 20, 2020
0e53c96
Removed unused variable
AndreaCatania May 20, 2020
84fc49d
TODO checked
AndreaCatania May 20, 2020
47bb669
Some typo fix
AndreaCatania May 20, 2020
3c5ef49
Some renames
AndreaCatania May 21, 2020
ee3fcc6
Optimized snapshot data sent, delta snapshot
AndreaCatania May 21, 2020
0a137d5
Added full snapshot request feature
AndreaCatania May 21, 2020
d9d8198
Using the same algorithm the server uses to recover the doll internet…
AndreaCatania May 25, 2020
db503c2
Improved player additional speed encoding rpc data
AndreaCatania May 25, 2020
d1ea69e
Send tick speedup percentage at fixed rate
AndreaCatania May 25, 2020
4c1f5f6
Removed the requirement of using the reset function
AndreaCatania May 25, 2020
fcf32ea
Moved all the support structures into the SceneRewinder, moved defaul…
AndreaCatania May 25, 2020
7983930
Renamed Rewinder to Synchronizer
AndreaCatania May 25, 2020
19987d9
Few minor things
AndreaCatania May 25, 2020
1684164
Fixed variant comparison
AndreaCatania May 25, 2020
6c7e2d0
Added more debug prints and fixed bug with array comparation and vari…
AndreaCatania Jun 2, 2020
49b802d
Adding support to more data type into InputsBuffer.
AndreaCatania Jul 21, 2020
a1b7950
Added real and Vector3
AndreaCatania Jul 22, 2020
44372bc
Improved DataBuffer and added support to more data
AndreaCatania Jul 22, 2020
8606b70
Implementing the Interpolator
AndreaCatania Jul 27, 2020
a1d7a19
Interpolator 1
AndreaCatania Jul 27, 2020
43dd87c
Interpolator fully implemented
AndreaCatania Aug 10, 2020
0ae55bd
Usage of interpolator checkpoint
AndreaCatania Aug 11, 2020
a206246
Usage of interpolator checkpoint 2
AndreaCatania Aug 11, 2020
b7a4fe3
Sync method 3.0 - WIP
AndreaCatania Aug 12, 2020
04e616d
Still working on the new sync
AndreaCatania Aug 12, 2020
cfe3a13
Converted to new sync, still WIP
AndreaCatania Aug 13, 2020
a6d56e3
New sync method implemented
AndreaCatania Aug 13, 2020
fb084d0
Removed unused parameters
AndreaCatania Aug 13, 2020
11cdece
Renamed some variables
AndreaCatania Aug 13, 2020
8e3b981
Implementing interpolator speed controller
AndreaCatania Aug 13, 2020
243ae91
Interpolator speedup/slowdown algorithm version 2
AndreaCatania Aug 28, 2020
4c74f0b
Added server doll update rate change
AndreaCatania Aug 31, 2020
c0c327b
Changed packet id and epoch int type to uint64 to uint32, putting the…
AndreaCatania Aug 31, 2020
3f5b23d
Added possibility to send the state in batch, to reduce cpu/bandwidth…
AndreaCatania Aug 31, 2020
fa67346
Added packet size cap to avoid fragmentation
AndreaCatania Sep 1, 2020
14ec8a6
Improved the interpolator that now accepts fractional parts for a smo…
AndreaCatania Sep 1, 2020
1836bb5
Implemeting a better interpolator pilot algorithm
AndreaCatania Sep 1, 2020
c6c1de1
Implemented third version of the interpolator pilot
AndreaCatania Sep 2, 2020
d29d3ca
Fixed some issues with the sync factor, Improving the interpolator pilot
AndreaCatania Sep 7, 2020
9ac9c5c
Polished the code and added support to pause doll sync.
AndreaCatania Sep 8, 2020
8202c56
Fixed some typos
AndreaCatania Sep 8, 2020
cfa645d
Renamed process_epoch to apply_epoch
AndreaCatania Sep 8, 2020
cc151a7
Renamed to
AndreaCatania Sep 8, 2020
9d7b70d
Small code improvement
AndreaCatania Sep 9, 2020
f05ff2e
Added the possibility to disable the controller networking.
AndreaCatania Sep 9, 2020
e09152e
New feature automatic stream pause.
AndreaCatania Sep 18, 2020
ccb1459
Fixed crash with an unreverted change
AndreaCatania Sep 18, 2020
c634ecf
Added buffer size sync during stream pause sessions.
AndreaCatania Sep 22, 2020
7ebb805
Fixed sync issue when the streaming was paused and an input submitted
AndreaCatania Sep 22, 2020
4fb50d4
Small improvement
AndreaCatania Sep 23, 2020
8c0cfc9
renamed input_buffer.h/cpp to data_buffer.h/cpp
AndreaCatania Sep 24, 2020
2a2d55a
Fixed DataBuffer that was writing the data with the wrong order in Wi…
AndreaCatania Oct 13, 2020
add923c
Restored code to clamp the integer and make it more explicit
AndreaCatania Oct 13, 2020
833a691
Removed current_input increment when the strea is paused. It was just…
AndreaCatania Oct 14, 2020
a8d1189
Improved the algorithm that speedup and slodown the virtual lag
AndreaCatania Oct 19, 2020
738e992
Make sure to check the variable index properly
AndreaCatania Oct 19, 2020
3b8fa1a
Small TODO
AndreaCatania Oct 19, 2020
2179159
added default
AndreaCatania Oct 19, 2020
12e1404
Improved sync mechanism for server->doll communication
AndreaCatania Oct 22, 2020
79e91c6
Renamed to
AndreaCatania Oct 27, 2020
1cdc166
Fixed some typos
AndreaCatania Oct 27, 2020
3493bb3
Removed some debugging lines
AndreaCatania Oct 27, 2020
5571197
Added possibility to generate and parse partial scene snapshot. DataB…
AndreaCatania Nov 3, 2020
baeccda
Improved padding algorithm
AndreaCatania Nov 4, 2020
b4255ad
Not all compilers support this syntax
AndreaCatania Nov 4, 2020
5c16989
Fixed issue with dictionary comparation. Make sure to process the ser…
AndreaCatania Nov 9, 2020
ae140b7
Added NetEventFlags, moved skip rewind to a function
AndreaCatania Nov 10, 2020
448d1c1
[Refactoring node management] Added organized_node_data. Improved the…
AndreaCatania Nov 10, 2020
1bf01fe
[Refactoring 3] Refactored the snapshot parser, so to avoid too many …
AndreaCatania Nov 11, 2020
86d3420
[Refactor 4] Use the new to get the , (Optimized node lookup). Impro…
AndreaCatania Nov 11, 2020
0eeec39
[Refactor 5] The 'Change' are now stored on a vector.
AndreaCatania Nov 11, 2020
2232979
[Refactor 6] Removed usage of instance_id
AndreaCatania Nov 12, 2020
32f2304
[Polish] Removed ControllerID, Optimized peer controller lookup
AndreaCatania Nov 12, 2020
2b6be71
[Refactor 7] Removed scene node vector: Now the is used instead
AndreaCatania Nov 12, 2020
f47f76b
[Refactor 8] Now the variable ID are stored and retrieved via ID (opt…
AndreaCatania Nov 12, 2020
b3b9b9e
[Refactor 9] SceneDiff is now using NetNodeId and NetVarId (optimizat…
AndreaCatania Nov 16, 2020
ca18db1
Integrated variable change event flag system:
AndreaCatania Nov 18, 2020
a30518b
Removed Ref usage which is no more needed.
AndreaCatania Nov 18, 2020
4be3dc8
Added properly mechanism to remove NodeData and exposed some useful A…
AndreaCatania Nov 19, 2020
d2e91ee
Using Vector instead of LocalVector to avoid reallocation when the sn…
AndreaCatania Nov 19, 2020
40686d8
Just minor improvement and warning removal
AndreaCatania Nov 19, 2020
c3ea45e
Fixed issue with snapshot generation. Added more info on the crash co…
AndreaCatania Nov 19, 2020
6943fa2
Make sure to clear the snapshots when the local player controller is …
AndreaCatania Nov 19, 2020
c317405
Fixed crash when the scene sync mode changes
AndreaCatania Nov 19, 2020
0c6a283
Fixed crash
AndreaCatania Nov 23, 2020
d4f20fd
Added possibility to change the interpolator default parameter, Expos…
AndreaCatania Nov 25, 2020
d0a5d0b
Make sure to emit the END_SYNC signal only if the SYNC produces a rea…
AndreaCatania Nov 26, 2020
377bab5
Lowered the input_storage_size bound
AndreaCatania Nov 26, 2020
20a38b3
Fixed crash when no variables are registered
AndreaCatania Nov 26, 2020
f8f4265
Added Controller Dependencies for more precise rewinding
AndreaCatania Dec 2, 2020
80d47e0
Added possibility to get list of dependencies.
AndreaCatania Dec 3, 2020
538b3f3
Make sure to not network peers that doesn't have a controller attached.
AndreaCatania Dec 3, 2020
4caad34
Added unlikely to peer controller id checkout
AndreaCatania Dec 3, 2020
e2c8ff4
Make sure that the snapshot array is properly resized when the parser…
AndreaCatania Dec 3, 2020
3242929
Suppressed warnings
AndreaCatania Dec 3, 2020
a7fc856
Fix crash about removals of synchronized nodes realized too late By P…
AndreaCatania Dec 3, 2020
3a2a049
Clear peer list in netsync, by Ilaria Cislaghi
AndreaCatania Dec 7, 2020
ff4b2ea
When the controller is disabled it's not stepped on no net
AndreaCatania Dec 8, 2020
0ee1a0c
Add safety checks to prevent error prints when checking controllet ty…
AndreaCatania Dec 8, 2020
5ac516a
Reset crash fix, Peer connect/disconnect fixed, Improved clear function
AndreaCatania Dec 10, 2020
f01e37c
Renamed all instances of set_enable to set_enabled
AndreaCatania Dec 10, 2020
fb9dc0e
Improved synchronizer ptr validity check.
AndreaCatania Dec 10, 2020
a2e808f
Now the clear runs immediately on any sync type.
AndreaCatania Dec 10, 2020
ec0610a
Correctly check server peer, when using set_peer_networking_enable
AndreaCatania Dec 10, 2020
69ce91c
Improved the doll interpolator that now introduces least possible vir…
AndreaCatania Dec 14, 2020
9a809ec
Simplified and improved the speedup mechanism.
AndreaCatania Dec 15, 2020
de3fc21
Removed useless variables
AndreaCatania Dec 15, 2020
96f95f3
Using OS::get_tick_msec for more precise stats.
AndreaCatania Dec 15, 2020
38a1640
Also the doll is using the OS to get the time between each batch arrives
AndreaCatania Dec 15, 2020
be728ae
Reset the controller info when the state(enable) change
AndreaCatania Dec 21, 2020
4f7611b
Improved connect/disconnect. Now it's easier faster and safer.
AndreaCatania Jan 7, 2021
7b8657b
Implemented node sync enable/disable
AndreaCatania Jan 7, 2021
d9d85a7
start/stop_node_sync now use const node
AndreaCatania Jan 8, 2021
f2942be
Now is possible to take the node from SceneNode ID
AndreaCatania Jan 8, 2021
c42bd70
Using remove_unordered and fixed an issue on the drop_node removal
AndreaCatania Jan 11, 2021
63500b8
Creating the used net sync StringNames at engine startup
AndreaCatania Jan 11, 2021
fba5e80
Removed TODO
AndreaCatania Jan 11, 2021
27a017f
Removed std vector
AndreaCatania Jan 11, 2021
c09c877
Exposed doll_net_sensitivity and max_delay
AndreaCatania Jan 11, 2021
2438699
Changed order of class registration and string name registration
AndreaCatania Jan 11, 2021
22c96a8
Fix public API of SceneSynchronizer class, NodeData struct is not ava…
AndreaCatania Jan 18, 2021
d0d022e
Correctly handled disconnection on doll.
AndreaCatania Jan 18, 2021
58fcb3f
Corrected is_enabled
AndreaCatania Jan 18, 2021
097ee79
Drop oa_hash_map changes, already in.
AndreaCatania May 5, 2021
8ff4b91
Fix compilation issues
Shatur May 5, 2021
04ed15c
Fix formatting and remove junk files
Shatur May 5, 2021
6b29418
Fix linters
Shatur May 5, 2021
0c22767
Fix warnings
Shatur May 5, 2021
0dc582a
Fix error in editor
Shatur May 5, 2021
50a599d
Remove unused includes
Shatur May 5, 2021
6dca951
Inline default constructors
Shatur May 5, 2021
35c7281
Pass by const reference
Shatur May 5, 2021
49f5e34
Do not init members explicitly
Shatur May 5, 2021
ca1bc23
Force braces around if statement
Shatur May 5, 2021
5eeefa8
Remove unused parameter
Shatur May 5, 2021
33faed2
Remove ABS on unsigned types
Shatur May 5, 2021
fe430f4
Use = default
Shatur May 6, 2021
af62748
Fix unsigned checks
Shatur May 6, 2021
04ba179
Handle negative values in normalized Vector3
Shatur May 7, 2021
fff1b87
Fixed false negative message
AndreaCatania May 7, 2021
629c9da
Fixed peer deactivation.
AndreaCatania May 8, 2021
e284f67
Fix StringName's cleanup
Shatur May 8, 2021
7e4bb4a
Run doctool
AndreaCatania Aug 11, 2021
7ce0178
Add check for controller
Shatur May 8, 2021
d38e048
Fix reset_synchronizer_mode if get_multiplayer() returns nullptr
Shatur May 9, 2021
1a97efc
Add tests for numbers in DataBuffer
Shatur May 9, 2021
ba0ea1e
Use fmod to get floating part
Shatur May 10, 2021
dd892b8
Add a separate method to store positive units
Shatur May 10, 2021
cc02a10
Apply review suggestions
Shatur May 11, 2021
e3727fd
Rework floating point compression
Shatur May 12, 2021
17e7e85
Apply review suggestions
Shatur May 18, 2021
387aa76
Do no apply sign to mantissa after overflow
Shatur May 18, 2021
54c8b87
Fix some corner cases
Shatur May 19, 2021
6920c44
Update information about compression
Shatur May 19, 2021
01c39d7
Add warning about fallback
Shatur May 19, 2021
a83f0b0
Improve warning message
Shatur May 20, 2021
8ebc0e7
Use Math::round
Shatur May 22, 2021
d9ec84b
Fix wrong captions for bool tests
Shatur May 22, 2021
45b49d1
Use BIND_ENUM_CONSTANT
Shatur May 22, 2021
c0debde
Handle negative values in seek
Shatur May 22, 2021
0308c47
Add tests for seek
Shatur May 22, 2021
5933255
Add tests for metadata
Shatur May 22, 2021
ff7e322
Add tests for zero
Shatur May 22, 2021
32a4032
Add tests for Variant
Shatur May 22, 2021
29e89d7
Add tests for force_set_size
Shatur May 22, 2021
6d18d51
Rename force_set_size to shrink_to
Shatur May 22, 2021
b38e997
Add a test for dry
Shatur May 22, 2021
2808882
Add tests for skip
Shatur May 22, 2021
e88608f
Crash on negative metadata
Shatur May 23, 2021
ab67a2c
Fix seek index check
Shatur May 23, 2021
98c0306
Extend tests for Variant
Shatur May 23, 2021
32f9b2b
Add tests for BitArray
Shatur May 23, 2021
4eac74e
Use 2 for min frames delay by default
Shatur May 28, 2021
a5b7eb8
Improve debug error messages
Shatur May 28, 2021
0374097
Warn if FPS is lower then physics fps
Shatur May 28, 2021
69d6e86
Use intermediate variable
Shatur May 30, 2021
1089948
Add tests for interpolator
Shatur May 31, 2021
8a29a7c
Fix typo
Shatur Aug 1, 2021
6960033
Update to the latest master
Shatur Jul 29, 2021
1d80fb5
WIP conversion to newest godot master (4.0)
kubecz3k May 10, 2022
dea1d3d
The interpolator it's now using Array instead of Vector<Variant>.
AndreaCatania May 12, 2022
fbbe552
Applied the latest master changes
AndreaCatania May 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tests for zero
Shatur authored and AndreaCatania committed May 12, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit ff7e322fc3e5c78e1f57b3da357524f0281797c8
10 changes: 10 additions & 0 deletions modules/network_synchronizer/tests/test_data_buffer.h
Original file line number Diff line number Diff line change
@@ -461,6 +461,16 @@ TEST_CASE("[Modules][DataBuffer] Metadata") {
CHECK_MESSAGE(buffer.size() == DataBuffer::get_bit_taken(DataBuffer::DATA_TYPE_BOOL, DataBuffer::COMPRESSION_LEVEL_0), "Size should be equal to expected");
CHECK_MESSAGE(buffer.total_size() == DataBuffer::get_bit_taken(DataBuffer::DATA_TYPE_BOOL, DataBuffer::COMPRESSION_LEVEL_0) + metadata_size, "Total size should be equal to expected");
}

TEST_CASE("[Modules][DataBuffer] Zero") {
constexpr DataBuffer::CompressionLevel compression = DataBuffer::COMPRESSION_LEVEL_0;
DataBuffer buffer;
buffer.begin_write(0);
buffer.add_int(-1, compression);
buffer.zero();
buffer.begin_read();
CHECK_MESSAGE(buffer.read_int(compression) == 0, "Should return 0");
}
} // namespace TestDataBuffer

#endif // TEST_DATA_BUFFER_H