+2 votes

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

in Engine by (1,461 points)

2 Answers

+5 votes

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

by (436 points)

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

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 ?

Take a screenshot via code and display it with sprite.

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

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

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

+2 votes

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

by (483 points)

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.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.