3 ms·
A Minecraft server in Rust [1]. The hope is to make it obscenely parallel with actor-like design (Minecraft chunks are nearly perfect for this). The real challe
by zamalek 7y ago
A Minecraft server in Rust [1]. The hope is to make it obscenely parallel with actor-like design (Minecraft chunks are nearly perfect for this). The real challenge so far has been the complete and utter mess that is the MC protocol; there's two different forms of UTF8 in the damn thing and there's NBT and JSON (which achieve the same thing). NBT itself has 2 ways to encode i32 and i64 arrays. So I haven't reached the bit where I play with parallelism yet.
[1]: https://github.com/jcdickinson/racemus https://github.com/jcdickinson/racemus
- dividuum 7y agoPretty nice and rewarding once you can first join your own server :-) Can confirm that the protocol is a mess. Also expect it to change massively between major versions, including new data types or shuffled packet ids. I've created a parser for Python and is was too much work to continue supporting beyond 1.8. Code is at https://github.com/dividuum/fastmc https://github.com/dividuum/fastmc I would guess one part where parallelism might help is interleaving of packet parsing and (de)compression if they exceed the compression threshold.