I am trying to make a basic tile scrolling program but am having problems implementing the culling of tiles which are not draw on the screen.
At the moment i have smooth movement to the right, but it seems to be jerky going to the left. Also i lose my very first and very last tile because i have overlapped the tiles to draw some offscreen. IE if 12 tiles fit across the screen i have 14 drawn for my scrolling.
I am unsure off where to go from here. If anyone can suggest methods or something i could do different to cull my tiles that are offscreen i would greatly appreciate it!
I have included my source code to show you how i am doing it, plus an executable to demonstrate the jerkiness when i move the tiles left with the left arrow key.