Release 0.17.0
Release 0.17.0
Upgrade to leafwing 0.15
Leafwing's newest version brings some improvements to the API, but also fixes an important bug where you couldn't use JustPressed
and JustReleased
in the FixedUpdate
schedule. That was problematic since networking usually requires inputs to be handled in the FixedUpdate
schedule. With this fix it is now much easier to use leafwing-inputs with lightyear.
Added rollback for non-networked components
Previously, only components that were registered in the ComponentRegistry
(meaning that they can be networked) could be affected by rollback. However there's plenty of cases where you might want to rollback non-networked client components: for example rolling back animations or sounds. You can now call app.add_rollback::<C>()
to enable rollback for a non-networked component.
Seamless entity mapping
Previously, entity-mapping was only done on the receiver. (i.e. server spawns E1, sends it to the client who spawns E2 and maintains a mapping from E1 to E2). The mapping wasn't applied when sending messages/updates, which meant that the client had to map the entity manually from E2 to E1 if they wanted to send a message about E2. Entity mapping is now correctly applied in all directions.
Introducing authority transfer
Lightyear
now has the concept of Authority
: which peer (client or server) is simulating the entity and sending replication updates for it? Only one peer can have authority over an entity at any given time.
The server can freely transfer authority over an entity to other peers with the EntityCommands::transfer_authority(new_owner)
command.
The Replicate
bundles automatically provide you with authority over the entity; make sure to remember to update them if you're just adding Replicate
on the server to re-broadcast a client-authoritative entity to other clients.
You can find an example with authority transfer here.
Important fixes
- Guarantee that inputs get synced correctly even in low bandwidth situations. PR
What's Changed
- set the channel priority to INF for ping/pong/inputs by @cBournhonesque in #566
- add MTU config for QUIC by @cBournhonesque in #567
- make InputBuffer::pop public by @RJ in #570
- Update book visual interp page with fixed physics example by @RJ in #571
- Add avian3d utilities by @cBournhonesque in #572
- Upgrade to leafwing 0.15 by @cBournhonesque in #575
- Use
Commands
instead ofWorld
to apply replication updates by @cBournhonesque in #581 - Fixed Local client not sending Connect event in HostServer Mode + Added Test by @zwazel in #578
- Add rollback for non-networked components by @cBournhonesque in #583
- add unit test server send message in host-server mode by @cBournhonesque in #588
- Dependency upgrade (wtransport, xwt, mock_instant) by @cBournhonesque in #589
- Allow seamless entity mapping by @cBournhonesque in #591
- Fix resource replication in host-server mode by @cBournhonesque in #592
- Add authority handling natively by @cBournhonesque in #594
- Excessive iteration over query in simple_box example by @nazgul72 in #596
- Add an example for authority transfer by @cBournhonesque in #597
- Fix Pre-Prediction by @cBournhonesque in #598
- Release 0.17 by @cBournhonesque in #600
New Contributors
Full Changelog: 0.16.4...0.17.0