Age | Commit message (Collapse) | Author |
|
`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.
|
|
|
|
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.
|
|
- 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).
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Handle removal of Pool*Array types and other recent changes.
|
|
Remove deprecated PacketPeer allow_object_decoding
|
|
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.
|
|
Those keywords were deprecated for 3.1 in #22087.
Also fix token name for `TK_REMOTE`, should be "remote" like the keyword.
|
|
|
|
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.
|
|
|
|
Applying #30187.
|
|
Thanks to @bojidar-bg's impressive work in #29380.
|
|
- 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
|
|
|
|
|
|
Safer encode/decode variant.
|
|
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).
|
|
|
|
|
|
NOTE: This changes the RPC_MODE_* enum values.
Games should be re-exported. GDNative rebuilt.
|
|
The slave keyword will still be available as deprecated in 3.1 but will
be dropped from future releases.
|
|
Fix various missing arguments in bindings.
|
|
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|