Open Exiled1 opened 1 year ago
Additionally, we should split network communications into reliable/unreliable, so that plugin devs can choose the best option for their use-case. For example, moving a whole building once might be a reliable operation (since you want to make sure everyone has the same state and we don't care about latency. Another example would be avatar motion, where unreliable communication would be preferable due to low latency.
enum Reliability {
/// Reliable, with potentially high latency (as in TCP)
Reliable,
/// Unreliable, with low latency (as in UDP)
Fast,
}
This could be exposed in Message
s by modifying the Locality
enum to include this information:
enum Locality {
Local,
Remote(Reliability),
}
The Synchronized
component would also expose this:
struct Synchronized(Reliability)
Note that this is exposed as an extension to QUIC https://www.rfc-editor.org/rfc/rfc9221.html
We should eventually use the QUIC protocol to send our network connections.