Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Client/Server Replication: How? #254
Currently, Shared has no good way to send things over the network, and Client and Server are a mess about it. We need a sane API to be able to replicate things over the network.
First let's think about what needs replication:
There's a few things to consider here:
How about just setting
Update frequency and priority should also be some definable settings.
Ok so I'm thinking this is a good model for how to do networking as an API.
We already have shared, client and server. The primary part of the content communication between client and server happens through shared, and the client and server specific code are obvious.
Let's make an example.
Actual netcode transfers are in bold. Note that there's only two types of transfers: replication and RPCs (remote procedure calls).
This chain of events is inspired by how UE does net code, too. The advantage is that you can write all code on server without issue and the icon changes are replicated like BYOND, or you can do animations on the client and be more responsive.