Hi! I am new to Colyseus, and I loved using it far. However, as I build my game, I realize that it is very laggy(without interpolation/extrapolation) when I try to receive patch every 50ms and update the player's position. I know that I should add interpolation too, but it is unusually laggy(player jump from one position to another). Could this be due to having very large main Schema object? Is the main state schema sent to every client every patchrate? How could I let it send only the position to every client at every update?
What exactly is sent at every patch rate?
Hi @laladehulu, welcome 👋 glad you’re enjoying it so far!
Only state mutations (state changes) are broadcasted to all clients at every patch. Not the entire state.
If you’re making a browser game you can check the Network tab in the developer tools to check how many bytes you are receiving constantly.
If you’re not using any type of interpolation the experience will indeed feel laggy, even if played locally. The most simple approach you could take is using “lerp” (linear interpolation)
Hope this helps, and hope you stick around! Cheers!