Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Lag build-up with keyboard movement

I've had this issue today, holding Alt and pressing an arrow key to move the token around. To be fair, I did it on my most cluttered Page.
1684548684
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Siz! Just checking, your intent was to nudge, pixel by pixel?
The Lag can be easily explained. Alt-arrow moves a token a small bit in a direction. Each token movement in the browser effectively means a roundtrip to the server: - vtt client calculates new position - vtt client sends new position to the server - server broadcasts sends new position to all active vtt clients (including the vtt of the user that pressed the keyboard) - vtt client shows the new position Just had a peek at the timings each roundtrip takes a little more than 100 milliseconds, which means the whole system can move a token at most 8 times per seconds. But... internet and the server (google firebase) are not perfect, so individual clients can experience lag based on the quality of the connection. My experience (NL 400MBs fiber with inhome GB ethernet) is better by a factor compared to one of my players (Deutsche Telekom ADSL 30MBs and wifi to a laptop). So that players laptop is constantly reconnecting to firebase (which you do not see) and experiences tremendous amounts of lag as it receives bursts of updates instead of a steady flow.
1684597444
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Thanks for the insight Martijn! Good detective work.
keithcurtis said: Hi Siz! Just checking, your intent was to nudge, pixel by pixel? Correct, I wanted it on the same axis but to the side, so instead of losing the precision I nudged it - though I needed it far to the side so I pressed a longer time.
Alright so the solution is just not to move it with Alt + keys too much at a time.