Results different on server and on client, but the game field and code the same.
Different is runners ticks realisation. It depends on result?
Server code:
let runner = Matter.Runner.create({ isFixed: true });
while (collectedBalls.length < generatedBallsCoords.length) {
Matter.Runner.tick(runner, engine);
}
Client code:
let runner = Matter.Runner.create({ isFixed: true });
Matter.Runner.start(runner, this.engine);
P.S. I need to run physics on server very fast to get result of game, before clients start animating the same simulation as server did...
Also I installed timesteps fix https://github.com/liabru/matter-js/pull/777
I'm also interested on how to achieve this.
I want to simulate the same animation on the server to predict what is going to happen.
The prediction should happen as fast as possible.
How do i do this?
Most helpful comment
I'm also interested on how to achieve this.
I want to simulate the same animation on the server to predict what is going to happen.
The prediction should happen as fast as possible.
How do i do this?