- Home /
How to Create Metroid-Style Minimap with RenderTexture
Hello,
I am creating a Metroid-like game with a world map. The world map consists of many individual rooms on a grid, with each grid/room having a fill and walls, with special wall colors or icons depending on locked door types, items, and other map legend requirements. Each of these fills/walls/items has an atlas-packed sprite for rendering. Each room is not rendered to the rendertexture until the player has discovered the room (i.e., it is black).
Loosely, I would like to draw each sprite to a rendertexture once it has been discovered, and to have a camera display that rendertexture without constantly having to redraw the entire map and all its sprites.
First, Does this method reduce draw calls? My understanding is that the rendertexture is not cleared each frame.
Secondly, Does this approach make sense?
Assu$$anonymous$$g the camera was orthographic to create a 2D top down map it seems like this could be done quite easily by simply having a black box placed above each room, high enough that the player won't see it from their POV but it will block the top down camera.
When the room is discovered destroy the box. If the $$anonymous$$imap wants to be live and show players and enemies in realtime this would be a pretty simple solution I think.
That's a valid point, however there is still additional information such as door/item/event markers on the map, so sprites or textureRects will still have to be drawn to a rendertexture.