kettle11 / tangle

Radically simple multiplayer / networked WebAssembly
MIT License
1.18k stars 37 forks source link

Consider using unreliable RTCDataChannels for better latency #9

Open kettle11 opened 1 year ago

kettle11 commented 1 year ago

Traditionally games use UDP-like packets for things like position updates and reliable-ordered protocols for important events or streaming assets. Right now Tangle uses reliable-ordered RTCDataChannels for everything, which means that all events are received by Tangle in order. But if message 12 arrives before message 10 it needs to wait for message 10 to arrive before Tangle processes it.

Tangle could instead rely on its rollback-based architecture to allow events to be processed in any order. This may dramatically improve latency in some cases in exchange for more internal code complexity.