I'm creating some tilemap support for my engine, and I can't really decide which two ways to go about it. Here's two ways I thought of: (P.S. I plan to load the tilemap from an external file such as a .txt)
1:
Each tilemap would be represented as a child class that would be derived from a base class called TileMap. To draw this tilemap when the character does something such as reaches the edge of the map, you would pass a reference to the object of the child class and it would draw that specific class. A camera would not be needed as the certain tilemap would be seen as a whole on the screen.
2:
Have 1 huge tilemap that periodically draws itself when the character moves in a certain direction. Once the character has reached the edge, it will collide and stop. A camera will be needed because the tilemap would need to scroll in the direction that the character is moving. There would only be one class called TileMap with methods such as void drawMap(), etc.
It would be helpful for some advice to pursue this task. Thanks in advance!