0

I have a javascript/canvas game using requestanimationframe to sync the drawing to the monitor. However I still get shearing effects when the game scrolls (Google Chrome on Windows 7). Is there a better way to draw to screen? Double buffer? This is what I use:

function draw() {
    requestAnimationFrame(draw);

    // Drawing code
}
draw();

You can see the problem here: http://www.pi-games.com/Thailet/

  • Canvas is double buffered. I had the same problem ib windows 7 but after the upgrade to 10 it was gone. Odd thing though was the shear was always around the same height on the screen, which means that its synced but for some reason being delayed. If it was not synced the shear would be occur randomly. There is not much that can be done – Blindman67 Dec 12 '15 at 08:48

1 Answers1

0

Perhaps it is more related to speed than to vsync problems. Here is an article how to improve the performance of the requestAnimationFrame when scrolling http://www.html5rocks.com/en/tutorials/speed/animations/

Klaus
  • 426
  • 5
  • 8