mas-bandwidth / netcode

Secure client/server connections over UDP
BSD 3-Clause "New" or "Revised" License
2.44k stars 191 forks source link

Up-to-date rust implementation of netcode #112

Closed benny-n closed 11 months ago

benny-n commented 1 year ago

Hi @gafferongames !

I have been working on a new, up-to-date (1.02) rust implementation of the protocol: https://github.com/benny-n/netcode

The existing rust versions by @vvanders' or @jaynus' were really helpful to me, both in practice and as a reference to my own rewrite, but it seems both of them are unmaintained. I plan to maintain and extend this one.

Unlike said versions, this one is not a fork but rather a "from scratch" implementation which to my opinion actually ended up being a bit closer to the original C implementation API-wise (e.g. recv instead of next_event to receive packets, callbacks instead of ServerEvent/ClientEvent, etc.).

Notable changes between this implementation and the others:

I can't currently release my version as a crate in crates.io, since it shares a name with @vvanders' version. I could:

  1. Call it netcode2 which avoids the name conflict, but could potentially confuse users(?)
  2. Get owner rights to the netcode crate from @vvanders, and push mine as an updated version of the same crate.

Anyway, I would love it if you could include this implementation in your list.

Thanks!

gafferongames commented 11 months ago

I'm totally down with whatever you want to do. I'm not sure if @vvanders is maintaining the rust version actively, but if he is, or if he can't be contacted, then the netcode2 sounds fine to me. Thanks!