Commit Graph

183 Commits

Author SHA1 Message Date
Thaddeus Crews
e4608dd6c2
Merge pull request #98138 from CrayolaEater/better-explanation-mp-sync
Better explanation for replication interval and delta interval (MultiplayerSynchronizer)
2024-11-15 10:42:47 -06:00
Bogdan Inculet
f72b841390 Better explanation for the replication interval and delta interval in the MultiplayerSynchronizer node 2024-11-15 02:46:10 +02:00
Thaddeus Crews
9be806aef1
Merge pull request #92986 from Repiteo/core/ref-instantiate-integration
Core: Integrate Ref `instantiate` where possible
2024-11-11 14:18:15 -06:00
Thaddeus Crews
def34fb06e
Merge pull request #98472 from rune-scape/sort-rpc
SceneRPCInterface: Sort rpc names using `StringLikeVariantOrder`
2024-11-11 14:18:07 -06:00
Thaddeus Crews
925b690c98
Core: Integrate Ref::instantiate where possible 2024-11-10 12:41:26 -06:00
Thaddeus Crews
696ca9db3c
Merge pull request #98039 from aaronfranke/button-icon
Rename internal Button `*_icon` functions to `*_button_icon` to match exposed methods
2024-10-29 19:25:59 -05:00
Aaron Franke
562c666e3d
Rename internal Button icon to button_icon to match exposed methods 2024-10-29 16:23:03 -07:00
Adam Scott
0d350e7108
Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
rune-scape
3c8615221a SceneRPCInterface: Sort rpc names using StringLikeVariantOrder 2024-10-24 14:16:30 -07:00
Pablo Andres Fuente
e376c4f30c Add unit tests for SceneMultiplayer
This PR aims to help "fix" #43440

Also fixing a small typo on `SceneMultiplayer` docs.
2024-09-29 21:44:52 -03:00
Rémi Verschelde
807136b679
Merge pull request #97425 from CrayolaEater/better-description-multiplayer-spawner-signals
Better description for multiplayer spawner signals
2024-09-26 18:45:42 +02:00
Thaddeus Crews
9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Bogdan Inculet
2cfe6d9f64 Better description for multiplayer spawner signals 2024-09-24 23:15:51 +03:00
aryan-11825114
7d7e0344ee Fix Network Profiler not disabling buttons 2024-09-17 13:19:15 +05:30
Rémi Verschelde
b573994730
Merge pull request #97045 from Calinou/doc-scenemultiplayer-auth-timeout
Document SceneMultiplayer `auth_timeout` being in seconds
2024-09-16 13:36:02 +02:00
Rémi Verschelde
4d35402c1c
Merge pull request #96400 from Maran23/inputmap-usage-for-filter-and-corresponding-refactor
Use InputMap actions consistently across all LineEdit's that filter an underlying Tree or ItemList.
2024-09-16 13:34:38 +02:00
Rémi Verschelde
8ebfd89359
Merge pull request #96024 from Ryan-000/expose_get_rpc_config
Expose `get_rpc_config` and `get_node_rpc_config`
2024-09-16 13:34:34 +02:00
Hugo Locurcio
212c34029e
Document SceneMultiplayer auth_timeout being in seconds 2024-09-15 17:49:38 +02:00
Rémi Verschelde
97843116f6
Merge pull request #96759 from Geometror/implement-autostart-profilers
Implement autostart for all profilers
2024-09-13 11:21:54 +02:00
Fabio Alessandrelli
32e4ab91e8 [MP] Fix broken RPCs after dictionary keys type change
As part of RPCs processing, they need to be sorted reliably across all
peers, so that unique IDs can be assigned to greatly optimize the
network layer.

The RPC configuration nodes are stored in dictionaries which, until
recently, always casted StringName keys to String.

Since method names (keys) in the RPC configuration were StringName,
a side effect of the above change is that sorting the dictionary keys no
longer sort them alphabetically by default (StringName are compared
using their pointers).

This commit changes the RPC processing logic to use sort_custom to
provide a function that can handle the StringName comparison.
2024-09-12 16:38:14 +02:00
Hendrik Brucker
c53fd9c7be Implement Autostart Feature for Profiler / Visual Profiler / Network Profiler
Co-authored-by: stmSi <stm1998sithumyo@gmail.com>
2024-09-10 19:40:42 +02:00
Ryan
8835f326b1 Expose get_rpc_config and get_node_rpc_config
add documentation

Update doc/classes/Node.xml

change name of get_node_rpc_config to get_rpc_config

Co-Authored-By: moondog <159832633+dog-on-moon@users.noreply.github.com>
Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
2024-09-04 15:45:22 -04:00
Rémi Verschelde
13a90e938f
Merge pull request #70096 from rune-scape/stringname-dict
StringName Dictionary keys
2024-09-03 17:38:06 +02:00
Fabio Alessandrelli
042b264c55 [MP] Fix division by zero in network profiler
The debugger reports synchronizers with empty state to the editor
even if no data is being sent to other peers.

The editor conditional to avoid division by zero was checking the wrong
variable.
2024-09-02 13:29:38 +02:00
Marius Hanl
74f64aaf98 Use InputMap actions consistently across all LineEdit's that filter an underlying Tree or ItemList.
- Instead of checking for Key::UP, Key::DOWN, Key::PAGEUP, Key::PAGEDOWN etc., we rather check for the action like 'ui_up' or 'ui_down'.
- Also use AcceptDialog's 'register_text_enter' functionality to consistently close a dialog when ENTER is pressed while the LineEdit has focus (instead of redirecting ENTER keys to e.g. the underlying Tree).
- Unify the LineEdit filter behavior for the SceneTreeDialog and corresponding usages
- Improve OK Button disablement (something should be selected)
2024-08-31 21:10:27 +02:00
rune-scape
154049ce17 StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 -07:00
Jordyfel
8c626f23c1 Fix typo in MultiplayerSpawner doc 2024-08-12 14:57:02 +03:00
Rémi Verschelde
03afb92efa
Merge pull request #95194 from Faless/mp/fix_relay_negative_target
[MP] Fix relay protocol routing with negative targets
2024-08-08 10:16:31 +02:00
Dommi
aebcd699fe Fixed undo not updating spawn checkbox in replication editor
When pressing undo the value was set to the same as it was before in the ui. It was saved correctly in the config but not updated in the editor.
2024-08-06 15:50:48 +02:00
Fabio Alessandrelli
c5fa7354bb [MP] Fix relay protocol routing with negative targets
Godot supports sending messages to "all but one peer" by sending a
packet with a negative target (the negated ID of the excluded peer).

The relay protocol was incorrectly interpreting the values and relaying
the message to the wrong peers.

This issue only affected "send_bytes" since the other subsystem (RPC
and replication) "resolves" the correct IDs client-side (to match
visibility information).
2024-08-06 13:21:47 +02:00
Fabio Alessandrelli
531c72f30d [MP] Avoid error spam in relay protocol when clients disconnect
When multiple clients are connected, and the server is using the relay
sub-protocol, it might happen that a client disconnects while a packet
sent to it from another peer is still in transit.

In that case, when the packet reaches the server for relaying, it used
to generate an error (as the destination client did no longer exists).

This commit changes check to suppress the error message while still
skipping the packet.
2024-08-06 09:51:28 +02:00
Rémi Verschelde
019cf2b40c
Merge pull request #94984 from Faless/mp/fix_safer_cache_cleanup
[MP] Partially revert cache cleanup, track paths as fallback
2024-07-31 22:33:07 +02:00
Rémi Verschelde
9559330187
Merge pull request #91011 from Faless/mp/fix_disconnect_on_change
[MP] Fix `disconnect_peer` not doing the proper cleanup
2024-07-31 22:32:55 +02:00
Fabio Alessandrelli
90d5d26026 [MP] Partially revert cache cleanup, track paths as fallback
Cleaning up remote NodePath cache is not trivial since the visibility
API allows for certain nodes to be despawned (and re-spawned) on some
peers while being retained in the authority.

This means that from the server point of view, the node has not changed,
and the path simplification protocol won't be run again after
respawning.

While we can track this information for synchronizers via the
replication API, we can't easily track this information for potential
child nodes that use RPCs (I'm convinced it is doable, but we need to
track the whole dependency tree which would require some more complex
refactoring).

This commit partially reverts some of the cache cleanup logic to always
retain remote IDs, and adds a NodePath lookup fallback when the ObjectID
is invalid.
2024-07-31 19:32:32 +02:00
Rémi Verschelde
6b8029414c
Merge pull request #93374 from hakro/fix-replication-config-error-flood
Instantiate a replication config on synchronizer creation
2024-06-22 16:22:11 +02:00
Rémi Verschelde
e5c0f60c59
Merge pull request #91084 from OwenAEdwards/master
Modify MultiplayerSpawner scene path error checking.
2024-06-21 10:14:06 +02:00
Hakim
fc4206b603 Instantiate a replication config on synchronizer creation 2024-06-20 01:14:50 +02:00
A Thousand Ships
fbb879debd
[Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
A Thousand Ships
ca18a06ecb
[Scene] Add SceneStringNames::confirmed 2024-06-19 09:40:54 +02:00
A Thousand Ships
d519715d94
[Scene] Add SceneStringNames::font(_size/_color) 2024-06-18 17:24:27 +02:00
A Thousand Ships
926afccbd8
[Scene] Add SceneStringNames::panel 2024-05-30 22:54:50 +02:00
Daniel Snd
1a9d95f933 Fix Multiplayer Spawner freeing node after client disconnected Issue 2024-05-25 13:34:33 -03:00
A Thousand Ships
ee79386f7b
[Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
kobewi
a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
A Thousand Ships
b4c6cc7d82
[Core] Add case-insensitive String::containsn 2024-05-08 12:48:01 +02:00
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
K. S. Ernest (iFire) Lee
f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
Aaron Franke
1bcbbe96c4
Organize existing code for editor plugins 2024-04-27 11:59:58 -07:00
Owen Edwards
2343c4208c
Modified MultPlayer spawnable scene path error checking. 2024-04-23 18:51:33 -04:00