summaryrefslogtreecommitdiff
path: root/doc/classes/MultiplayerAPI.xml
AgeCommit message (Collapse)Author
2021-08-18[Net] MultiplayerReplicator with initial state.Fabio Alessandrelli
Move the former "spawnables" functions to a dedicated MultiplayerReplicator class. Support custom overrides in replicator. Spawn/despawn messages can now contain a state. The state can be automatically encoded/decoded by passing the desired object properties to `spawnable_config`. You can use script properties to optimize the state representation. 2 Callables can be also specified to completely override the default implementation for sending and receiving the spawn/despawn event. (9 bytes overhead, and there's room for improvement here). When using a custom implementation `spawn` and `despawn` can be called with any Object, `send_spawn`/`send_despawn` can receive any Variant as a state, and the path is not required. Two new functions, `spawn` and `despawn`, convey the implementation independent method for requesting a spawn/despawn of an Object, while `send_spawn` and `send_despawn` represent the more low-level send event for a Variant to be used by the custom implementations.
2021-08-09[Net] Basic extensible MultiplayerAPI spawn/despawn.Fabio Alessandrelli
`PackedScene`s can be configured to be spawnable via a new `MultiplayerAPI.spawnable_config` method. They can be configured either to be spawned automatically when coming from the server or to always require verification. Another method, `MultiplayerAPI.send_spawn` lets you request a spawn on the remote peers. When a peer receive a spawn request: - If it comes from the server and the scene is configured as `SPAWN_MODE_SERVER`: - Spawn the scene (instantiate it, add it to tree). - Emit signal `network_spawn`. - Else: - Emit signal `network_spawn_request`. In a similar way, `despawn`s are handled automatically in `SPAWN_MODE_SERVER`. In `SPAWN_MODE_SERVER`, when a new client connects it will also receive, from the server all the spawned (and not yet despawned) instances.
2021-07-30[Net] Implement RPC channels in MultiplayerAPI.Fabio Alessandrelli
2021-07-30doc: Use self-closing tags for `return` and `argument`Rémi Verschelde
For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there.
2021-07-20[Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli
- Move the "sync" property for RPCs to RPCConfig. - Unify GDScript annotations into a single one: - `@rpc(master)` # default - `@rpc(puppet)` - `@rpc(any)` # former `@remote` - Implement three additional `@rpc` options: - The second parameter is the "sync" option (which also calls the function locally when RPCing). One of "sync", "nosync". - The third parameter is the transfer mode (reliable, unreliable, ordered). - The third parameter is the channel (unused for now).
2021-07-12[Net] Rename NetworkedMultiplayerPeer to MultiplayerPeer.Fabio Alessandrelli
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-06-01[Net] Refactor RPCs, remove RSETsFabio Alessandrelli
In this PR: - Removed rset - rpc_config can now optionally configure transfer mode (reliable/unreliable/ordered) and channel (channels are not actually implemented yet.) - Refactor how the RPC id is computed to minimize the logic in Node and scripts that now only needs a single `get_rpc_methods` function.
2021-01-25Document that the high-level multiplayer API is only for Godot serversHugo Locurcio
2020-07-05add root_node as property of MultiplayerAPIJummit
2020-02-25doc: Sync classref for Packed{Int,Float}{32,64}Array additionsRémi Verschelde
2020-02-18doc: Sync classref with current sourceRémi Verschelde
Handle removal of Pool*Array types and other recent changes.
2020-02-13Merge pull request #36144 from akien-mga/remove-deprecated-allow-decodingRémi Verschelde
Remove deprecated PacketPeer allow_object_decoding
2020-02-13Remove deprecated PacketPeer allow_object_decodingRémi Verschelde
It was added for 3.2 in #27485 to preserve backwards compatibility, but we can now remove it. It is still needed in MultiplayerAPI as it's the only way to control it for the internal put_var calls.
2020-02-13Remove deprecated sync and slave networking keywordsRémi Verschelde
Those keywords were deprecated for 3.1 in #22087. Also fix token name for `TK_REMOTE`, should be "remote" like the keyword.
2020-01-31Update docs to version 4.0clayjohn
2020-01-26doc: Drop unused 'category' property from headerRémi Verschelde
We already removed it from the online docs with #35132. Currently it can only be "Built-In Types" (Variant types) or "Core" (everything else), which is of limited use. We might also want to consider dropping it from `ClassDB` altogether in Godot 4.0.
2019-12-06doc: Markup fixes for enums and constantsRémi Verschelde
2019-06-30doc: Remove null default values that can't be determinedRémi Verschelde
Applying #30187.
2019-06-30doc: Add default values to all propertiesRémi Verschelde
Thanks to @bojidar-bg's impressive work in #29380.
2019-06-27Proofread and improve the whole class referenceHugo Locurcio
- Document a few more properties and methods - Add more information to many classes - Fix lots of typos and gramar mistakes - Use [code] tags for parameters consistently - Use [b] and [i] tags consistently - Put "Warning:" and "Note:" on their own line to be more visible, and make them always bold - Tweak formatting in code examples to be more readable - Use double quotes consistently - Add more links to third-party technologies
2019-06-27doc: Replace all [code]CONSTANT[/code] by new [constant CONSTANT] hyperlinksRémi Verschelde
2019-04-19doc: Drop unused <demos> tagRémi Verschelde
2019-04-01Merge pull request #27485 from Faless/io/encode_decode_safety_prRémi Verschelde
Safer encode/decode variant.
2019-04-01Add object encoding param to serialization methodsFabio Alessandrelli
Network peers get_var/put_var File get_var/store_var GDScript/Mono/VisualScript bytes2var/var2bytes Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding. Break ABI compatibaility (API compatibility for GDNative).
2019-04-01doc: Bump version to 3.2Rémi Verschelde
2018-12-20doc: Add missing commas after "If true/false"Rémi Verschelde
2018-09-15Clearly deprecate sync too in favor of remotesync.Fabio Alessandrelli
NOTE: This changes the RPC_MODE_* enum values. Games should be re-exported. GDNative rebuilt.
2018-09-15Rename slave keyword to puppetFabio Alessandrelli
The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.
2018-07-26doc: Sync classref with current sourceRémi Verschelde
Fix various missing arguments in bindings.
2018-06-03Add option to disable automatic multiplayer pollFabio Alessandrelli
Automatic poll from SceneTree is enabled by default. This allows for polling (and thus RPCs/RSETs) manually in other loops (e.g. physics, thread, specific step) and for proper mutex protecion when accessing the multiplayer API from threads (e.g. for sending larger files in chunks).
2018-05-29New sync RPC modes to match all combinationsFabio Alessandrelli
2018-05-29Refactor RPCMode enum and checksFabio Alessandrelli
2018-05-29Revert "RPCMode refactor, more sync modes"Max Hilbrunner
2018-05-26New sync RPC modes to match all combinationsFabio Alessandrelli
2018-05-26Refactor RPCMode enum and checksFabio Alessandrelli
2018-05-17[docs] fix links in class docsKelly Thomas
2018-05-12Fix and improve docs, adds send_bytesFabio Alessandrelli
2018-05-08Document MultiplayerAPI classFabio Alessandrelli
2018-04-10doc: Sync classref with current sourceRémi Verschelde