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

Operating efficiency is extremely poor #34

Open
scc172fly opened this issue May 5, 2019 · 3 comments
Open

Operating efficiency is extremely poor #34

scc172fly opened this issue May 5, 2019 · 3 comments

Comments

@scc172fly
Copy link

Hi
I ran with my computer and found that it was inefficient and often crashed, and it was also hard to run, so it looked bad. My computer configuration is quite high.

@proepkes
Copy link
Owner

proepkes commented May 7, 2019

hello,
the rollback & fast-forward can become very performance intensive. there is currently no limit how many frames can be rolled back and if 2 clients framenumber drift apart too much then it's like a ping-pong-effect which leads to unstoppable rollback
i don't have a solution for this yet sorry

@logixworx
Copy link

what is causing the crashing?

@proepkes
Copy link
Owner

proepkes commented Aug 19, 2019

While no input from other players is received, the simulation is in "prediction"-mode, so the client predicts that there is no input from other players and just continues running the simulation. (Input can be anything, e.g. a packet with just a framenumber in it, it must not necessarily be a keystroke)

Now if the simulation receives an input from the very past, the prediction was wrong and the simulation has to rollback to the inputframe and fast-forward to the latest frame. Depending on the number of frames this can be a huge hit on performance. And while fast-forward is running, another input from the past can arrive so the whole process repeats itself.

So if there is one client always lagging behind he forces every other player to rollback because his input does not arrive in time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants