I have created a basic map generation. Basically this system randomly creates all the terrain, but i dont want a fixed layout where you can reach the start and the end of the map, I want to create something like a sandbox game. In order to do that, instead of my character moving, all the rest of the map needs to move to the appositive direction, so if I jump, the character don't move but the rest on the screen will move down. If I walk to the right, the map will move to the left and so on. The problem is that i don't know how to do that with tilemap because I can't just work with it's width and height like a tiled background would work.
Also, I'm using array to make it possible. I thought about having an extremely big array and start feeding it in the middle of it's width and height and then make this transition about what is shown in the tilemap and what is deleted as it goes away from my view.
Obs: the array should be, in any situation, extremely big in order to feel like a sandbox so the player couldn't reach the start or the end of the map, so it would feel like an infinity map.
To sum up, how do I create an "infinity" map using tilemap and array?
Edit: Which's the limit of width and height of an array? How much megabytes would have my savegame if this array had 100k of width and height filed?