The Networking team is happy to announce the release of 0.1.0 of the laminar crate. It provides UDP networking modified for the needs of game networking. Most of the techniques used were published and detailed by Glenn Fiedler at https://gafferongames.com/. We’d like to extend a special thanks to him and his articles.
- UDP-based protocol
- Retry logic for packets
- Detection and notification of client disconnects via mpsc channels
- A link conditioner to simulate packet loss and latency
- Well tested by integration tests and unit tests
As a team, we adopted the following the workflow agreements. When we begin work on the amethyst_network crate, we’ll use the same agreements. They are focused on maintaining a high level of quality in the code, and for working with a highly distributed team. We’re including them here as some of the other teams may find them of use.
- All warnings produced by cargo test are treated as errors by the CI/CD system
- All Clippy warnings are treated as errors by the CI/CD system
- We use kcov to track our code coverage; we do not have a required minimum, rather we use this as a potential indicator of issues
- We included sample code about using the library
- Setting up a benchmarking framework so we can track regressions
- Unit and integration tests, as well as release testing with docker-compose
As a team, we (eventually) agreed on a coherent style for all our work. See this document for more information.
Some of the most helpful ones have been:
- Keep PRs small, preferably under 200 lines of code when possible
- Comments should explain why, not what
- You must provide comments for public API
- No hard-coded values
- No panics nor unwraps in non-test code
- rustfmt should be done as its own PR, to avoid generating giant PRs that are impossible to review
- We make use of the forking workflow