Libgdx | How to create a minimap?

I am making a top-down labyrinth game in libgdx and I am using extensionViewport to render a game camera. I am a little confused about how I am going to create a minimap. Should I create an additional viewport and camera for the minimap? I am still not familiar with the entire viewing / camera area. Thank you

+4
source share
1 answer

Wyatt, the mini-map, of course, should not be just a smaller version of your entire game viewport. The reason is that it has different functionality and looks compared to the game’s viewport. Instead, the minicar should be an actor on the stage who takes the layout of your card to draw yourself, and the percentage x and y of your position and camera size relative to the maze to point to the minimap that the player is currently seeing. If at all possible, I suggest you stick with 1 camera and 1 viewport for the entire project if you are not familiar with libgdx. You will save a lot of time and frustration. Good luck.

-1
source

All Articles