Hello all!
Nice being able to post in a sub-forum! Thanks!
I have a syncing dilemma and I’m interested in ways this can be solved.
First the pre-requisites of what is happening. The value in question is for an energy bar that is used to cast skills and gets stored in a dynamicbuffer.
It starts at 100, the skill is cast with 33 energy costs and it’s 67 for 1 frame. Then the energy value gets overwritten with values from the server and after some time reaches the correct value of 67 again.
Format is: Tick Entity EnergyValue LastResourceTick
Obvious first solution would be to handle the prediction correctly. Casting the skill and reducing the energy costs only runs once. Prediction has a great cost though so I’m searching mostly for solutions without the need to predict.
Second solution I can think of would be to introduce a local unsynced lastTick and a synced lastTick in the buffer and check against those.
I’m using it in some other places already. Which is exactly the reason why I dislike the solution. It should be handled more globally (not necessarily by NetCode), I think, so it would not overwrite the data in the first place, feeding the systems with old/wrong values.
Maybe some of you have already tackled this issue on several angles. I’m interested in your solutions.
Thanks