I've got a top-down layout that uses seed generation and a tilemap to infinitely generate terrain. Whenever the player reaches an invisible edge of the layout, their position is reset and the tilemap is repopulated with their new offset co-ordinates.
Terrain cannot be modified by the player, so I don't store any of the terrain information in an array or anything.
I do want to include "fog of war" (FoW) though, hiding undiscovered tiles until the player gets close enough to them.
I can't simply place a FoW layer that erases tiles the player gets near because the entire layout is being re-generated constantly. Instead I need to store the offset positions of cleared tiles, and I'm curious what is the most efficient way of doing this? I could make an array and place in every tiles offset X and Y, but that array will quickly get massive as its expected the player will be uncovering tens of thousands (if not more) tiles during their exploration.
Suggestions? Thanks!