Java – Library | How do I create a small map?

Library | How do I create a small map?… here is a solution to the problem.

Library | How do I create a small map?

I’m working on a top-down maze game in libgdx, and I’m using extendViewport to render the game camera. I’m a bit confused about how to create a small map. Should I create an additional viewport and camera for a small map? I’m still new to the whole viewport/camera. Thank you!


Wyatt, the little map certainly shouldn’t just be a scaled-down version of the entire game viewport. The reason is that it has different features and appearance compared to the game viewport. Instead, a mini-map should be an Actor on the Stage that accepts the layout of the map to draw itself, as well as x and y percentages of your camera’s position and size relative to the maze to indicate what the player is currently seeing on the mini-map. If possible, I recommend sticking with 1 camera and 1 viewport throughout your project, unless you’re very familiar with libgdx. You’ll save yourself a lot of time and frustration. Good luck

Related Problems and Solutions