summaryrefslogtreecommitdiffstats
path: root/core/multiplayer
Commit message (Collapse)AuthorAgeFilesLines
* [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli2022-07-266-1323/+0
| | | | | | | | | - 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.
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-251-3/+3
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Merge pull request #63262 from dsnopek/multiplayer-peer-custom-4.xFabio Alessandrelli2022-07-242-0/+33
|\ | | | | [4.x] Allow extending MultiplayerPeerExtension from GDScript
| * Allow extending MultiplayerPeerExtension from GDScriptDavid Snopek2022-07-202-0/+33
| |
* | Add peer visibility to MultiplayerSynchronizer.Fabio Alessandrelli2022-07-202-4/+10
|/ | | | | | | | | | | | | | | | | | | MultiplayerSynchronizers can now be configured to limit their visibility to a subset of the connected peers, if the synchronized node was spawned by a MultiplayerSpawner (either automatically or via custom spawn) the given node will also be despawned remotely. The replication system doesn't have the logic to handle subspawn directly, but it is possible to handle them appropriately by manually updating the visibility of the parent before changing the one of the nested spawns via the "update_visibility" function. The visibility of each MultiplayerSynchronizer can be controlled by adding or remove filters via "[add|remove]_visibility_filter(callable)". To further optimize the network code, visibility filters can be configured to be automatically updated during idle or physics frame, or set to always require manual update (via the "update_visibility" function).
* Clean up Hash Functionsreduz2022-06-201-5/+6
| | | | | | | Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934 * Clean up usage of murmur3 * Fixed usages of binary murmur3 on floats (this is invalid) * Changed DJB2 to use xor (which seems to be better)
* finish renaming AUTH to AUTHORITYNathan Franke2022-05-251-1/+1
|
* Add a new HashSet templatereduz2022-05-201-2/+2
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Use range iterators for RBSet in most casesAaron Record2022-05-191-2/+2
|
* Replace most uses of Map by HashMapreduz2022-05-162-3/+3
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* [Debugger] Move most profilers to ServersDebugger.Fabio Alessandrelli2022-02-061-1/+0
| | | | | Also splits bandwidth/rpc profiler (RPCProfiler is now in SceneDebugger).
* [Net] Move RPC, Node cache out of MultiplayerAPI.Fabio Alessandrelli2022-02-054-818/+80
| | | | | | | | | Now uses two interfaces so it can be overridden in the future, and core no longer depends on Node. The interfaces are implements in scene/multiplayer. Replaces root_node with root_path. Remove all Node references from MultiplayerAPI.
* [Net] New replication interface, spawner and synchronizer nodes.Fabio Alessandrelli2022-02-045-1005/+154
| | | | | | | | | | | | | | | | | | Initial implementation of the MultiplayerReplicationInterface and its default implementation (SceneReplicationInterface). New MultiplayerSpawner node helps dealing with instantiation of scenes on remote peers (e.g. clients). It supports both custom spawns via a `_spawn_custom` virtual function, and optional auto-spawn of known scenes via a TypedArray<PackedScenes> property. New MultiplayerSynchornizer helps synchronizing states between the local and remote peers, supports both sync and spawn properties and is configured via a `SceneReplicationConfig` resource. It can also sync via path (i.e. without being spawned by a MultiplayerSpawner if both peers has it in tree, but will not send the spawn state in that case, only the sync one.
* Update copyright statements to 2022Rémi Verschelde2022-01-039-18/+18
| | | | Happy new year to the wonderful Godot community!
* Fix various typosluz paz2022-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn` Update editor/import/resource_importer_layered_texture.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update doc/classes/TileSetScenesCollectionSource.xml Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/graph_edit.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/rich_text_label.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Revert previously committed change
* PackedByteArray, Array slice end exclusive, rename subarray to sliceNathan Franke2021-11-261-1/+1
|
* [Net] Fix spawn/despawn custom callable argument.Fabio Alessandrelli2021-10-121-1/+1
| | | | Was always reporting it to be a spawn, even for despawns.
* [Net] Rename RPCConfig.sync to call_local.Fabio Alessandrelli2021-10-082-4/+4
| | | | For consistency with the other user facing changes.
* [Net] Rename RPC constants and annotation arguments.Fabio Alessandrelli2021-10-012-3/+3
| | | | | | | | | any -> any_peer sync -> call_local ordered -> unreliable_ordered Multiplayer.RPC_MODE_ANY -> RPC_MODE_ANY_PEER Multiplayer.TRANSFER_MODE_ORDERED -> TRANSFER_MODE_UNRELIABLE_ORDERED
* [Net] MultiplayerPeer cleanup, defaults.Fabio Alessandrelli2021-09-242-16/+42
|
* [Net] Bind Multiplayer to GDExtension.Fabio Alessandrelli2021-09-242-1/+220
|
* Fix custom multiplayer sync commandsSaracenOne2021-09-121-2/+5
|
* Multiplayer networking renames/simplificationMax Hilbrunner2021-09-085-134/+134
| | | | Removes _networking_ prefix from some methods and members, now that multiplayer has been largely moved out of Node and SceneTree and is seperated into its own set of classes.
* [Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli2021-09-0710-0/+2625
Move multiplayer classes to "core/multiplayer" subdir. Move the RPCConfig and enums (TransferMode, RPCMode) to a separate file (multiplayer.h), and bind them to the global namespace. Move the RPC handling code to its own class (RPCManager). Renames "get_rpc_sender_id" to "get_remote_sender_id".