Hmm... I don't really know how to explain this accurately, but I will try to give some hints:
- define the full map (including the areas to be explored) in your textfile
-> your map will cover a lot more space than the screen size
- calculate an overall position for each tile. since the map is much bigger than the screensize,
the lower right corner of your map can be 4096, 3072 for example.
- treat your screen as a "viewport" to the map area
- virtually assign your screens top-left corner a position inside your map and modify it, when the player moves
- find all tiles in your map, that are at least partly inside the screen-area
(taking the tiles position, the screen position, the tile-size and the screen-size into account)
- draw the resulting tiles to the screen at the coordinates calculated by substracting the screen-position from the tile-position
(example: tile position 480,240 - virtual screen-position 300,200 = draw the tile at 180,40 to the screen)
There are several approaches to optimize this approach speed-wise (which may depend on the graphics library you use), but the above is the basic idea.