Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Feature: Add prediction to MDCRMInterpolatedValue #36

Open
Beider opened this issue Jul 1, 2020 · 1 comment
Open

Feature: Add prediction to MDCRMInterpolatedValue #36

Beider opened this issue Jul 1, 2020 · 1 comment
Labels
new feature Brand new functionality to the framework

Comments

@Beider
Copy link
Collaborator

Beider commented Jul 1, 2020

The GameClock interpolated Vector2 does not currently support prediciton.
Adding prediction would be fairly simple, simply calculate the velocity based on the last two updates every time we update the vector and if we stop recieving updates we can simply apply the same velocity every tick.

One thing that may be needed is a state for the MDCRMInterpolatedVector2 so we know if we are in initial update mode, interpolation mode or prediction mode.

Question is how long should prediction apply? I would suggest not allowing prediction to last more than 1-2 seconds as after this it is likely that the player is disconnected. It is probably best to stop the player so they don't activate triggers far off in the distance if they keep sliding in the same direction.

@Beider Beider added the new feature Brand new functionality to the framework label Jul 1, 2020
@DoubleDeez
Copy link
Owner

DoubleDeez commented Jul 2, 2020

Question is how long should prediction apply?

Depending on the prediction algorithm, this might not matter. We could just predict what the value will be when the next update is expected and not go beyond that.

@DoubleDeez DoubleDeez changed the title Feature: Add prediction to MDCRMInterpolatedVector2 Feature: Add prediction to MDCRMInterpolatedValue Aug 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new feature Brand new functionality to the framework
Projects
None yet
Development

No branches or pull requests

2 participants