Still trying to make progress on the map scrolling thing. Discovered the problem: the map tiles add their position to the offset. Offset is calculated by the map as a positive, therefore offset needs to be a negative for tiles scrolling around to the beginning again.