lichess.org
Donate

Pieces lag behind a cursor, possible solution

This is a universal problem. Any object in a browser would lag behind a cursor. It's not very bad, however in fast time controls it may cost some precision.
This is what I mean:
youtu.be/VDZF5zXRDlM
It's not so noticeable when there is no OBS recording (it consumes some CPU power and pieces lag more). But it still happens.

This is a good site for testing different vsync, mouse input, lag factors: www.vsynctester.com/

Here it explains this problem with input delay:
www.vsynctester.com/game.html
You can turn off "Show software cursor" and see how software cursors or objects in browser lag behind your hardware cursor.

CSS allows us to change our cursor. This is an experiment I did on Lichess: youtu.be/-bwyszDWxfc

However, I have only found how to change cursor on the whole board, or on move destinations. This is my CSS code (a bit different than in the video), (using "Stylish" from Chrome apps):

.brown .is2d .cg-board {
cursor: url("s3-us-west-2.amazonaws.com/s.cdpn.io/9632/happy.png"), auto;
}

.cg-board square.move-dest:hover {
cursor: url("http://www.rw-designer.com/cursor-view/110951.gif"), auto;
}

And I can't find out how to apply different cursors to different pieces. Does someone know if it's possible? I tried all possible ways to address pieces, pieces dragging, etc, but to no avail yet.

This could (at least as a userstyle) be a possible solution to lagging pieces. For example, Lichess could have an option to use hardware cursors for every piece (with possibility to resize them). If that's not possible, I would still like to hear possible solutions for modifying it with CSS.
I've also found that cursors don't change their size when you resize a page. Maybe there is a workaround, though. Any help would be greatly appreciated.

This topic has been archived and can no longer be replied to.