Closed cBournhonesque closed 1 year ago
Beautiful :pray:
Yeah this stuff has changed a lot for the 0.16
release too, thank you very much though for this, I will be able to integrate it into the 0.16
release, great stuff :+1:
I got this ported over to Release 0.16 at https://github.com/naia-lib/naia/pull/137, thanks again Charles! :pray:
Hi,
I was intending this change to primarily be about derive-stuff, but it seems like some other changes got looped in. I struggled a little bit with the merge conflicts as there was a lot of stuff! (the main branch I operate on is still on naia 0.14) There might still be some errors related to the merge
Changes
Main change:
remove naia-parse
ChannelIndex
(stop using naia-parse)Serde
trait, it can be somewhat confusing when users already have theserde
crate imported somewhere.#[derive_channels]
and#[derive_serde]
have been replaced with#[derive(ChannelIndex)]
and#[derive(Serde)]
. I think this change is much cleaner and benefitial in the long-term. I've been annoyed a couple times by the previous behaviour where#[derive_serde]
would derivePartialEq
andClone
without me being aware of it (and was preventing me from deriving it explicitly)Additional small changes from previous PRs:
added a
has_entity
method on the bevy server (was useful for me to update scopes)added a
TickManagerConfig
object to make the client's tick manager more configurable. I had to experiment a lot with the tick manager, updating the jitter buffer, etc. I think this is definitely needed.expose some methods to access the
client_receiving_tick
andclient_sending_tick
Migration guide
use naia_serde::derive_serde;
withuse naia_serde::Serde;
#[derive_channels]
with#[derive(ChannelIndex)]
(should probably also make the other derives explicit here..)#[derive_serde]
with#[derive(Clone, PartialEq, Serde)]