Crate lightyear

source ·
Expand description

§Lightyear

Lightyear is a networking library for Bevy. It is designed for server-authoritative multiplayer games; and aims to be both feature-complete and easy-to-use.

You can find more information in the book or check out the examples!

Modules§

  • Channels are used to add reliability/ordering on top of the transport layer
  • Modules related to the client
  • A connection is an abstraction over an unreliable transport of a connection between a client and server
  • Handles networking client inputs
  • Module to group messages into packets
  • Prelude containing commonly used types
  • The Protocol is used to define all the types that can be sent over the network
  • Serialization and deserialization of types
  • Defines the Server bevy resource
  • Shared code between the server and client.
  • Provides an abstraction over an unreliable transport The transport layer is responsible for sending and receiving raw byte arrays packets through the network.
  • Extra utilities Contains a set of useful utilities

Macros§

  • This macro is used to build the Protocol struct. For convenience, it will re-export some types that need to have the Protocol as a generic parameter, so that you don’t have to type <MyProtocol> everywhere. Notably: