kettle11 / tangle

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

Consider moving network code to Rust (?) #12

Open ValorZard opened 1 year ago

ValorZard commented 1 year ago

taking a quick look through the code, and it seems as though the code is being run through a custom rollback netcode implementation written in typescript. However, wouldn't typescript be a bit slow? It feels like it would be better to use a network library written in rust, like GGRS

kettle11 commented 1 year ago

It's a good question and something I've been thinking about as well.

Some thoughts:

Initially I started writing Tangle in Rust but I was finding it easier to iterate on the architecture in TypeScript. Now that I've nailed down the key architectural details it may be easier to try again in Rust.

I should definitely study GGRS, but I'm hesitant to adopt it immediately. Tangle's designed for apps as well as games which leads to different priorities. Like this open issue would be a problem for Tangle: https://github.com/gschup/ggrs/issues/23.

But I suspect GGRS is doing some things better than Tangle to learn from.


Thanks for asking! It's got me thinking.