Implement Minimap Generator with improved performance techniques
grannypron opened this issue · 2 comments
Using the minimap causes lag. This is generally because the minimap is implemented as a second camera and the frame rate is inversely proportionate to the number of rendering cameras.
Change to use a system like the one described at https://www.youtube.com/playlist?list=PLxj06lQ-YNLso8RRYGvQeP_ExILPjmAg4 where pre-rendered textures are used.
Original description from the Discord post is:
"The current minimap has bad performance because it renders a view of the map in real time using a second camera. The minimap needs to be updated to use pre-rendered image tiles so the performance hit of having a second camera can be avoided. The current performance his is at least 15 fps. I found this tutorial on YouTube that has the exact type of system I want, but haven't had time to look through it and implement it. I couldn't find a link to any github source for quick implementation. If possible, implement this minimap system."
Propose implementing as a AnyRPG/Minimap/Generate Minimap menu option. This will create an Assets/Minimap/Textures folder and dump the textures in there. If there is no folder or the folder is empty, generate a Debug.LogWarning that indicates that. Otherwise, render the minimap with the images that are in that folder.
Addressed in #25