A little test server used to implement protocol ideas for Familyline, a game I am developing.
Also a way for me to learn Rust.
This code is not too good, but I will probably make it clearer.
Also, no test suite yet. My other Rust experimental program has some.
Currently, I have only:
-
the basic discovery protocol, a very striped-down version of SSDP, that the client will use to find the server. The server binds to a multicast address, the same as SSDP, but to a different port to avoid issues.
-
most of the HTTP protocol that the game will use to query things to the server when on lobby, and probably to propose suggestions, like map type and game type. Also you will be able to download maps, like Quake game servers let you.
There are some properties of the game, like game mode for example, that I will implement after I have a more or less working client on the game itself -
the most part of the in-game protocol messages working. There is no error treatment yet; I will do it once I have the basic networking OK
The in-game protocol, that the game will use to send his inputs and receive other players' input, send and receive chat data, synchronization packets and verification packets, is a little bit implemented. Input data is OK, verification, synchronization, error checking are not.
We use FlatBuffers to encode it. They need you to define a schema, and they encode the data in a more or less common format. The schema definition will of course help development.
And that's it. Suggestions and criticism are very welcome, but please do not be an �sshole. I am learning.