Skip to content

Conversation

@penggrin12
Copy link

Since Broadcast(...) is a shortcut for Send(0, ...), why not also include a shortcut for Send(1, ...)

Could be renamed to something else though. I don't like SendToAuthoritySayWords

@Joy-less
Copy link
Owner

My main concern with this is that it could lead to "method explosion" where every RPC adds a lot of extra methods. I already think the Broadcast method might be too much, so adding an extra method to send to authority might be a problem. I definitely see your point though and maybe it's worthwhile.

@penggrin12
Copy link
Author

The decision is on you, I think. I can see how cluttering the IDE and the binary even more would be bad.
If only there was some kind of "Explicitly strip on build if unused" attribute...

@penggrin12
Copy link
Author

penggrin12 commented Nov 19, 2025

At least some kind of Rem.Authority = 1 const int would probably be nice. I don't think it's a thing in regular Godot.

SendXXX(Rem.Authority, ...)

@Joy-less
Copy link
Owner

At least some kind of Rem.Authority = 1 const int would probably be nice. I don't think it's a thing in regular Godot.

SendXXX(Rem.Authority, ...)

Godot already has MultiplayerPeer.TargetPeerServer (1) and MultiplayerPeer.TargetPeerBroadcast (0) but unfortunately they are typed as long not int so you have to do SendXXX((int)MultiplayerPeer.TargetPeerServer, ...).

@Joy-less
Copy link
Owner

Joy-less commented Nov 19, 2025

SendXXX(Rem.Authority, ...)

I like the syntax but we don't have a Rem class so I would have to create it only for these two properties, which I don't know if is ideal. Unless you would like RemSendService.Authority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants