Replies: 3 comments
-
Nice read, thanks for the recommendation! For speculative input, I was considering something similar. IIRC Rocket League simply "fades" inputs, i.e. if you were accelarating a frame ago, it's a reasonable assumption that you're still accelarating, just a little bit less. This way, the correction would be smaller, no matter if you're still accelerating or slowly stopping. Currently, netfox just doesn't simulate objects for which we don't have an input, as to reduce glitching from mispredictions. What I've considered was to have a variable or similar for input age, i.e. how old is our last known input. This way, users can implement whatever logic fits their game. Or let netfox know that they have no reasonable way to guess input, so skip simulating this object for this tick. This proved somewhat more involved than I expected, so it didn't make it into the initial release. But it would be nice to bring this back! I think the main point would be to make sure predictive inputs are simulated on each peer, and maybe for the host to not broadcast these speculative states as authoritative. Input delay is an interesting take! There's currently display delay, which is tbh not that thoroughly tested, but there nonetheless. I'm wondering what would be the pros/cons of this approach over displaying a slightly older game state? |
Beta Was this translation helpful? Give feedback.
-
Isn't it already implemented? See 2nd comment: #253
Implemented in #261 |
Beta Was this translation helpful? Give feedback.
-
Just created #321 for input prediction. There's also #245 / #276 for input delay from @TheYellowArchitect. I'll close this thread, but new ideas are always welcome. Next release shaping up to something huge 🙂 |
Beta Was this translation helpful? Give feedback.
-
Looking over GGPO netcode it does two things to further hide latency.
Speculation where it guesses what the next input might be. Netfox could provide selectable algorithms ( or let a user create their own ) that can be chosen in a Rollback node config. The algorithms don't seem overly complex, for example one is to simply repeat an input when first seen. ie - Someone pressing left on tick 1 is highly likely to continue pressing left on tick 2.
Input delay the authoritative player. The idea here being that the player won't notice a few ticks of delay in their inputs but it does buy a packet time to make it across to the server for higher fidelity. Theoretically in low ping environments a server and client may even be able to simulate a tick apart.
This actually doesn't require Netfox to implement but it could be something added to the extras controller.
https://github.com/pond3r/ggpo/blob/master/doc/DeveloperGuide.md#tuning-your-application-frame-delay-vs-speculative-execution
https://github.com/pond3r/ggpo/tree/master/doc#removing-input-delay-with-rollback-networking
Beta Was this translation helpful? Give feedback.
All reactions