Skip to content

heinrich5991/libtw2

Repository files navigation

libtw2

Some Teeworlds stuff in Rust.™

This repository hosts some third-party Teeworlds/DDNet libraries and tooling, written in Rust. Additionally, it has some programming language independent documentation of some Teeworlds/DDNet protocols, in the doc directory.

The highlights are probably

  • doc. The documentation.
  • wireshark-dissector. A working Wireshark dissector for Teeworlds 0.6, Teeworlds 0.7 and DDNet.
  • gamenet/generate/spec. JSON files describing the high-level Teeworlds 0.6, Teeworlds 0.7 and DDNet protocol.

Documentation

More links to other people's documentation can be found in "Resources" on the DDNet Wiki.

Code

The code is split into many smaller and larger libraries. Bold names indicate that the libraries or executables might be useful outside of libtw2.

  • _old. Unmaintained implementation of the low-level file format of Teeworlds/DDNet maps ("datafiles"), written in C, before libtw2 turned to Rust.
  • common. Utilities for all the other crates. Number conversion, byte strings, etc.
  • datafile. Low-level file format of Teeworlds/DDNet maps.
  • demo. Low-level file format of Teeworlds/DDNet demos (replays).
  • downloader. Downloader for maps from game servers.
  • event_loop. Helper for creating Teeworlds/DDNet protocol clients/servers.
  • gamenet. Multiple crates for handling the high-level Teeworlds 0.6, Teeworlds 0.7 and DDNet network protocols.
  • gamenet/generate/spec. JSON files describing the high-level Teeworlds 0.6, Teeworlds 0.7 and DDNet protocol.
  • huffman. Homebrew compression format using Huffman coding, used in demos and over the network. Alternative: Ryozuki's rustyman.
  • logger. Utility crate to unify logging across libtw2 code.
  • map. High-level format of Teeworlds/DDNet maps. You should probably use Patiga's TwMap instead.
  • net. Low-level network protocol of Teeworlds 0.6, Teeworlds 0.7 and DDNet.
  • packer. Encodings for Teeworlds/DDNet network protocols and file formats. See also Ryozuki's teeint for another implementation of Teeworlds/DDNet's variable-length integers.
  • render-map. Render Teeworlds/DDNet maps to images. You should probably use Patiga's TwGpu instead.
  • server. Proof-of-concept Teeworlds 0.6 server implementation.
  • serverbrowse. Server info protocol for Teeworlds 0.5, Teeworlds 0.6, Teeworlds 0.7 and DDNet. See also Ryozuki's teestatus. Essentially superseded by the DDNet HTTPS masterserver protocol, server list is at https://master1.ddnet.org/ddnet/15/servers.json, you should probably use that instead.
  • snapshot Teeworlds/DDNet data structure for transferring gamestate.
  • socket. Helper for creating UDP sockets.
  • stats-browser. Used for adding entries to the DDNet HTTPS masterserver, for game servers not supporting the HTTPS masterserver protocol. Originally intended to provide a tracking for Teeworlds servers. That info can now be found at https://ddnet.org/stats/master/ and parsed using Ryozuki's teemasterparser.
  • teehistorian. DDNet file format for storing all player input. Alternative: Zwelf's teehistorian.
  • tools. Various tools.
  • uniffi. Python bindings for huffman using Mozilla's uniffi: libtw2-huffman.
  • wireshark-dissector. Working Wireshark dissector for Teeworlds 0.6, Teeworlds 0.7 and DDNet.
  • world. Proof-of-concept Teeworlds physics. You should probably use Zwelf's TwGame instead.
  • zlib-minimal. Minimal wrapper around zlib.

About

Some Teeworlds stuff in Rust.™

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published