a tilebased game,
2D rectangle tiles with a size of 5000X5000 pixels per rectangle.
I make every rectangle know the 4 neighbouring rectangles in the map so starting from one you can generate an essentially infinite map.
I want to move this map around instead of moving the player around, the player stays centered on screen and since the map moves under him it looks like he's the one doing the moving.
So I know the following things:
Width and height of a single section:
the x and y location of the center section can be a value anywhere from -5000,-5000 to 5000,5000
The visible screen real estate is 1920 X 1080 pixels big
0X,0Y always stars top left, bottom right is 5000X5000
What I need to end up with:
A percentage value of howmuch this specific section is visible on screen, "inside the rectangle that is the scfeen)