R
R
ratatyq2017-02-02 19:06:14
JavaScript
ratatyq, 2017-02-02 19:06:14

How to implement smooth synchronization (preferably using interpolation) in a js game?

Hello, there was a problem, I am writing a small game and I need to implement smooth movements of all clients, so that the player does not twitch, he tried to do it using interpolation, but the code came out stupid and everything slowed down even more (I tried to do everything through an array), maybe someone can throw off the finished implementation of interpolation I will be very grateful.
PS I write on nodejs using express + socket.io packages, and also use phaser.io on client js

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nirvimel, 2017-02-02
@ratatyq

Linear interpolation of (any) coordinate is done like this:
No arrays are needed there!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question