How do I…
I am creating a minimap for my topdown shooter. The minimap i’m currently using is generated by a tilemap on a seperate layer, which allows me to easily create custom tiles for seperate rooms. I’ve been trying to create a border around the map so only the rooms in a 5x5 radius are visible. The minmap itself works perfectly fine, it’s just once the player ventures out far enough the map becomes extremely large which is why i want the border. I’ve attempted many methods but find this problem unsolvable.
Current Results
After exploration where the map is too big.
Coding
The tilemap currently has 5 tiles for each room type, being:
- An invisible tile that represent a completely undiscorvered room
- A darkened version of the room for adjacent rooms
- A light up room for discovered room
- 2 invisible tiles for both the dark and light rooms that can be used for rooms outside the boundaries
The map’s layout is built while the world is generated and undiscorvered rooms are marked accordingly. While moving between rooms the adjacent rooms are at first dark, but light up once entered. My current theories are that once the tile is no longer in the 5x5 radius it is set to its corresponding invisible tile, however if it is in radius, it’s switched back to its visible counterpart.
I would heavily prefer if i could keep the tilemap format for the minimap however will change it if necessary