-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiplayer networking renames/simplification #52480
Conversation
e0321ec
to
451831e
Compare
+1 for get_peers, connection is implied as you mentioned. |
Reaming of So, I would leave EDIT: The other renames looks good. |
We discussed this briefly and decided to indeed rename
|
94ec64c
to
9822efd
Compare
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.
9822efd
to
5b25457
Compare
@Faless Updated as discussed, Also updated the PR description to reflect these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! 👍 . Thanks!
var net := ENetMultiplayerPeer.new()
var err := net.create_server(12345)
assert(err == OK)
get_tree().multiplayer.multiplayer_peer = net
|
@nathanfranke you don't need to call Edit, and yes, I fear that will be confusing, especially the |
Yeah, I had changed it to just peer first as you suggest, but it was indeed unclear because of the peer functions on multiplayer that aren't related, thus we changed it to multiplayer_peer. Its verbose, but usually you shouldn't need it too often. |
Removes the 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. Previously, it was useful to mark these so people knew they were multiplayer related when looking at them on Node or SceneTree, but now they have moved to Multiplayer its self-evident and just makes them longer and less readable.
Part of #16863.
RENAMES
MultiplayerAPI
Functions and Properties
multiplayer.is_network_server()
->multiplayer.is_server()
multiplayer.network_peer
->multiplayer.multiplayer_peer
multiplayer.has_network_peer()
->multiplayer.has_multiplayer_peer()
multiplayer.get_network_peer()
->multiplayer.get_multiplayer_peer()
multiplayer.set_network_peer()
->multiplayer.set_multiplayer_peer()
multiplayer.get_network_connected_peers()
->multiplayer.get_peers()
multiplayer.get_network_unique_id
->multiplayer.get_unique_id()
multiplayer.refuse_new_network_connections
->multiplayer.refuse_new_connections
multiplayer.set_refuse_new_network_connections()
->multiplayer.set_refuse_new_connections()
multiplayer.is_refusing_new_network_connections()
->multiplayer.is_refusing_new_connections
Signals
network_peer_connected
->peer_connected
network_peer_disconnected
->peer_disconnected
network_peer_packet
->peer_packet
Node
Functions and Properties
Node.network_authority
->Node.multiplayer_authority
Node.is_network_authority()
->Node.is_multiplayer_authority()
Node.set_network_authority()
->Node.set_multiplayer_authority()
Node.get_network_authority()
->Node.get_multiplayer_authority()
Note this contains very minor changes to some log messages that are now cleaned up in
RPCManager::_send_rpc()
. I had to edit a few of them anyway for consistency with these changes.