0

I have a grid of tiles (200 across and 200 down). I want to display them on the screen within the screen viewport and let the user scroll with their finger to move the tiles around. There would only be 3-4 tiles displayed on either axis at any time.

So, my question is, if I have a center point which is the center of the screen. How can I calculate which tiles I need to draw and draw them relative to the center?

I know this is a basic question but I'm new to graphics programming and can't find any examples that explain how to do it.

Dan
  • 115
  • 1
  • 8
  • This is sounds like a basic geometry problem. I'd suggest getting out some graph paper and drawing your grid and a device viewport and working it out from there. – Jason Mar 18 '20 at 15:55
  • I don't know where to start with this. How would I work this out with graph paper? I don't see how that helps. – Dan Mar 19 '20 at 08:50

0 Answers0