What would the best way be to exploit the client-authoritative Character control that ROBLOX implements (probably in UDP) to get client movement inputs?
For example, one way to do it would to have the player’s character hidden from them, but still in the workspace, and the server could read their Humanoid’s MoveDirection as a proxy for inputs.
Does anyone have any better ideas? What’s the minimum StarterCharacter I’d have to build for the ControlScript to modify the MoveDirection properly, if that’s the best way?
Why?
I want to implement a server-authoritative custom controller. I could send inputs over RemoteEvents, but I’d prefer not to use a reliable channel for a stream like this. I’m guessing ROBLOX doesn’t either, which is why exploiting their engine implementation for character controller seems like a good bet.
Sorry for the necrobump, but just in case anyone else is researching this like I was:
It seems it’d probably be a good idea to use Value objects or the relatively newly introducted Attributes to achieve replication that isn’t “reliable” (i.e. the latest changes are prioritized and any intermediate changes are otherwise discarded). There isn’t a need to exploit any of the ROBLOX character implementations for this purpose; just use the provided interfaces to ROBLOX replication (values/attributes).
This is only viable for Server → Client replication, as client sided changes are local, and don’t replicate to the server (with a few exceptions with network ownership and some properties I believe, which OP was wanting to use to their advantage).
Even if you used attributes in server to replicate data to the client, it would be replicated to everyone. That’s quite a lot of unnecessary network traffic in servers with a lot of players, when only one player may need the data. There also may be some data you want to only selectively replicate to a few players, and not everyone which there is no way to currently do if you want to use unreliable replication.
The API that Roblox provides for networking things is fairly lacking, and there is quite little documentation on how the underlying networking code works for physics, remote events and other things that would be useful to know, not only in order to create a good server-authoritative character, but for other networking related things.
Here are some feature requests related to giving better APIs for networking: