Minimap from stage tileset

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jospic
:warning: Old Version Published before Godot 3 was released.

Hi,
I need to create a minimap to see the current position player relative to the entire playing area. Is there anyway to extract a minimap from the current tileset stage, or others valid methods?
Thanks in advance.
-j

:bust_in_silhouette: Reply From: KRL

It’s done by setting a second viewport using a camera that is spotting whole scene.

I’d have to agree with this, couldnt another way of doing it be to Make a map spawn via code, Then Have that Coordinate to the players position in said minimap and have it Generate a smaller map for the minimap (bit more work but like, if they wanted to use different sprites and stuff for the map view

The_Duskitty | 2016-03-15 18:30

I think the best thing is to avoid additional cameras, but convert the tilemap in a sprite or texture and scale it. Does anyone know how to do ?

jospic | 2016-03-16 09:59

Take a screenshot via code and display it with sprite.

KRL | 2016-03-16 18:34

Every working solution is good solution and ofcourse there are many ways to archive that i just posted the simplest i know.

KRL | 2016-03-16 19:03

But the screenshot takes only viewable part of tilemap, not overall…
Or am I wrong ?

jospic | 2016-03-16 19:23

You are right, but it works like that:

  1. Put camera very far so it enclose the whole tilemap
  2. Take screenshot
  3. Display it as minimap

KRL | 2016-03-16 19:28

:bust_in_silhouette: Reply From: The_Duskitty

An idea for what you could do is, Rebuild the map in a program (example gimp, or photoshop) If you’re doing 2D, and just use it as a texture for the map, if you’re doing 3D then i would Highly recommend just Using a second viewport and Just for example, have an indicator for the direction Be an arrow or something that follows the player’s facing direction

Yes, perhaps this is the most simple idea. I have done so in the past, but I’d like to create minimap “on the fly” at runtime , so it will be always synchronized with the main map.

jospic | 2016-03-17 08:32