#Ghost field changes event from server

1 messages · Page 1 of 1 (latest)

summer field
#

Can I, for optimization purposes, receive a change event in GhostField on a static ghost rather than receive it every tick on the client systems?
I understand that this can generally be done via RPС, but ghost fields seem more relevant.

empty thorn
#

Not very clear what you mean with " than receive it every tick on the client systems?" What are we comparing here? RPCs? Synced ghost fields?

summer field
empty thorn
#

You can keep a local tracker & sync value to track. E.g. counter or networkTick

summer field
empty thorn
#

You could probably also try use ChangeFilters, but that might give you false positives.

summer field
# empty thorn Correct

oh, thanks, now I do the same, due to the local cache, however, this does not eliminate unnecessary iterations on entities

empty thorn
summer field
empty thorn
#

It's easy to test

summer field
boreal hill
summer field
boreal hill
#

so 1 entity out of 128 changed here - all entities get triggered on change filter

summer field
boreal hill
#

kinda

#

most of the time this doesn't actually optimize btw

#

ECS usually is not working well with reactive patterns

summer field
boreal hill
#

either way

#

serialization on server side works exactly like this

#

tracks change filters as broadphase

#

and then does field comparison

#

field by field

#

finds out which ghost fields changed, and serializes them for networking

#

and it's fairly performant (but super complicate to implement)

summer field
#

yep, and this is crutch

strong hull
#

static ghost's ghostfields aren't supposed to be included in any snapshots after the first one unless a field changes i thought? It was my understandind that static didn't mean never changes