summaryrefslogtreecommitdiff
path: root/scene/multiplayer
AgeCommit message (Collapse)Author
2022-06-11Add suffixes to all nodes and resourcesFireForge
2022-06-04rename 'configuration' to 'replication_config' in MultiplayerSynchronizerNathan Franke
2022-06-04typo: change congiruation into configurationWinston Yallow
2022-05-23Improve MultiplayerSynchronizer editor usabilityreduz
* Add a button to add properties (which lets you select node and property) * Add ability to drag properties and drop them to the editor. * Made the editor transient (not always visible on the bottom) since its not needed most of the time. * Added the ability to pin the editor, in case dragging properties from other nodes is desired.
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-16Replace most uses of Map by HashMapreduz
* 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!
2022-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-05-05remove child on despawn instead of just queue_deleteNathan Franke
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-03-09Remove VARIANT_ARG* macrosreduz
* Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-02-21[Net] Optimize object cache notification send for single peer.Fabio Alessandrelli
It used to always cycle all the peers when checking which one needed to be notified, now it only does that when the target is multiple (i.e. broadcast or exclusion).
2022-02-21[Net] Fix multi-peer path-only replication.Fabio Alessandrelli
It used to check if a net_id was ever assigned to that node to detect when to send the path confirm to the remote peer. This is wrong, because the same net_id is shared for all the remote peers, but sent one by one. Instead we now check if it's either not assigned or if the assigned net_id is a cache ID, and in that case ensure that the remote peer has been notified. This can be further improved by unifying the cache interface, but for now it's a fast fix to get path-only sync to work.
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-02-09Merge pull request #57876 from Faless/mp/4.x_clarify_rpc_errorFabio Alessandrelli
[Net] Clarify RPC error when method is missing.
2022-02-09[Net] Clarify RPC error when method is missing.Fabio Alessandrelli
2022-02-06[Debugger] Move most profilers to ServersDebugger.Fabio Alessandrelli
Also splits bandwidth/rpc profiler (RPCProfiler is now in SceneDebugger).
2022-02-05[Net] Move RPC, Node cache out of MultiplayerAPI.Fabio Alessandrelli
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.
2022-02-04[Net] New replication interface, spawner and synchronizer nodes.Fabio Alessandrelli
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.