summaryrefslogtreecommitdiff
path: root/modules/multiplayer/scene_replication_interface.cpp
AgeCommit message (Collapse)Author
2023-01-17[MP] Fix nested spawning during "ready".Fabio Alessandrelli
We want our spawns to be notified after ready, but we need to notify them in the order they entered tree, so that nested spawners can be used during "ready" (instead of having to await a frame).
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-11-20[MP] RPC visibility.Fabio Alessandrelli
Implemented using MultiplayerSynchronizers. If you didn't use the synchronizer visibility features, nothing changes. If you were using visibility, RPCs to broadcast should now behave as expected in most configurations (i.e. by sending the RPC to _visible_ peers). If you want to limit the visibility of RPCs for a node, add a synchronizer for it, and configure the visibility via "set_visibility_for" or by adding a visibility filter.
2022-11-19[MP] Initial replication profiler.Fabio Alessandrelli
Part of the current network profiler stack. Tracks synchronizers, incoming/outgoing state sizes, and their bandwidth usage.
2022-11-17[MP] Improve network profiler.Fabio Alessandrelli
Fix RPC profiler and add average RPC size. Improve bandwidth debugger to account for all multiplayer traffic (excluding the lower level peer transformations).
2022-11-02Style: Misc docs and comment style and language fixesRémi Verschelde
- Removed empty paragraphs in XML. - Consistently use bold style for "Example:", on a new line. - Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`). - Fix invalid usage of backticks for inline code in BBCode. - Fix some American/British English spelling inconsistencies. - Other minor fixes spotted along the way, including typo fixes with codespell. - Don't specify `@GlobalScope` for `enum` and `constant`.
2022-10-31Merge pull request #67445 from Zylann/rename_queue_deleteRémi Verschelde
Rename queue_delete => queue_free
2022-10-27[MP] Let MultiplayerAPI handle packet relaying and peer signaling.Fabio Alessandrelli
MultiplayerPeer changes: - Adds is_server_relay_supported virtual method Informs the upper MultiplayerAPI layer if it can signal peers connected to the server to other clients, and perform packet relaying among them. - Adds get_packet_channel and get_packet_mode virtual methods Allows the MultiplayerAPI to retrieve the channel and transfer modes to use when relaying the last received packet. SceneMultiplayerPeer changes: - Implement peer signaling and packet relaying when the MultiplayerPeer advertise they are supported. ENet, WebRTC, WebSocket changes: - Removed custom code for relaying from WebSocket and ENet, and let it be handled by the upper layer. - Update WebRTC to split create_client, create_server, and create_mesh, with the latter behaving like the old initialize with "server_compatibility = false", and the first two supporting the upper layer relaying protocol.
2022-10-24Rename queue_delete => queue_freeMarc Gilleron
# Conflicts: # editor/plugins/tiles/tiles_editor_plugin.cpp
2022-10-16Fix MultiplayerSynchronizer peer visibilityWei Guo
2022-10-03[MP] Allow multiple synchronizers per node.Fabio Alessandrelli
The same node can now be controlled by multiple synchronizers at once. Spawn visibility is composed in OR across multiple synchronizers (i.e. if any synchronizer is visible to the peer, the object will be spawned). Synchronizers controlling spawned nodes can now have a different authority then the one spawning the node, in that case, the spawn variables for that specific synchronizer are simply ignored (other synchronizers with the same authority of the spawner will correctly synchronize variables on spawn). The SceneReplicationState class has been completly removed, since it was bloating the implementation, the state is now simply stored in the SceneReplicationInterface.
2022-09-30Add Error for synchronizer authority mismatchGuilherme Sousa
2022-07-30document multiplayer replication classes, small changes to multiplayer spawnerNathan Franke
2022-07-29Remove Signal connect bindsJuan Linietsky
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
2022-07-26[Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli
- RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.