This tutorial shows how to do scrolling for sprites. I have seen many scratchers do scrolling, but the code is not very flexible. Hopefully this tutorial will help to understand the code behind scrolling. It is a little complicated, but if you read carefully, and understand what is written, then it should be very simple. The same technique is used to make higher level games like 3D and pen platformers. So I thought that scrolling was a good place to start. Also this also teaches how to have one main game loop controlling the whole game rather than multiple scripts which can be confusing.