Skip to content

Release 0.12.0

Compare
Choose a tag to compare
@cBournhonesque cBournhonesque released this 13 Mar 15:21
· 435 commits to main since this release
5077a58

Release 0.12.0

Added

Server can support multiple Transports simultaneously

A lightyear server can now listen simultaneously on different types of Transports: WebSocket, WebTransport, UDP, local channels, etc.
It requires almost no code change: instead of providing a single TransportConfig when building the server, you can now provide a Vec<TransportConfig> and the server will be listening on each config simultaneously!

All examples have been updated to showcase this behavior: the server listens for WebTransport connections on port 5000, UDP on port 5001 and WebSocket on port 5002!

This is very exciting for two main reasons:

  • this is will allow cross-play between different connection configurations. I have plans to integrate with Steam and EOS (Epic Online Services). With this feature, players connected via Steam could also play with players connected via UDP directly to a dedicated server!
  • this enables running lightyear in "Listen Server" mode!

Running lightyear in "Listen Server" mode

"Listen Server" means that a player acts as both the server and the client. (the server will run on a separate thread on the client's machine). This could be useful for p2p games, or for some single-player game architectures where the client talks to a local server.
With the above change, it is now easy to run lightyear as a Listen Server! The server and client apps run on different threads and use local channels to communicate with 0 latency, and other clients can still connect to the host.

All examples have been updated to be able to run like this with the command: cargo run -- listen-server

Updated

  • Updated all examples to use a separate settings.ron file to specify the networking configuration. (the previous cli-based approach wasn't flexibly enough when using multiple transports for a given server)

Future work

My next priority will be to add Steam as a connection option.