#Intended what to preserve prediction correctness with non player entity interaction?

1 messages · Page 1 of 1 (latest)

crude echo
#

To my understanding:
Ghost entities [Simulate] tag can be enabled/disabled differently between entities during a prediction tick.
If it is using the Simulate tag it means that it's current state with current ticks mutations will be used for next prediction ticks as well.
The final prediction tick writes history that is used for future predictions.

So lets consider the case where entity A is not using Simulate this frame and entity B is. None of these are the player or interacted by the player.
Entity B wants to modify a synced state of entity A. Since A is not using Simulate tag it will in future ticks restore it's state from the history and not care about the changed state from entity B.

So is there an intended way to deal with this?

minor carbon
#

You're only predicting making a change to A, the next time predicting runs the tick runs again if you're prediction holds you'd make the same change again right?

crude echo
#

And to my understanding the state of A would only be stored in the case where both A and B has simulate enabled for that tick, which would in the final tick result in a new history entry.

minor carbon
#

if it doesn't roll back to run the tick again, it shouldn't override your change

#

from memory, it stores the state from the server

#

and when it rolls back it just loads that state

#

also it only saves state of ghost components, if you have non-ghosted components your changing you probably need to add manual rollback support to it

#

it's been like 6 months since i've used netcode but i'm pretty sure these types of details are things you shouldn't need to care about most of the time

#

it should just /work/

crude echo
#

Hmm. Just to clarify, are you saying that if it needs to roll back to run a tick again, all ghosts should be marked as Simulate for all ticks?
What I'm trying to describe here is that
B - history/serverState 0
A - history/serverState 5
B attempts to modify state of A at tick 3.
Now from tick 0->5 B will have Simulate tag, between tick 3->5 I would guess A has Simulate disabled and has the modified state from B.
From tick 5->N A has no longer the modified state from B.

minor carbon
#

as far as I recall, doesn't simulate tag for predicted ghosts only get disabled on a partial tick

#

or is the thing you modifying interpolated?

#

From tick 5->N A has no longer the modified state from B.
but anyway why do you think this?

#

if you modified it in tick 3, it never roll back before tick 3 again

#

then the only way the state wouldn't persist is if it doesn't happen on server

#

in which case it has been correctly fixed from the server state

#

is this an issue you've actually run into, or just theoretical

crude echo