SFML community forums

Help => Graphics => Topic started by: smguyk on November 10, 2014, 09:48:04 am

Title: Is there a better way to make a minimap?
Post by: smguyk on November 10, 2014, 09:48:04 am
I'm making a 2d platformer and I'd like to have a minimap. I saw this tutorial (http://sfml-dev.org/tutorials/2.0/graphics-view.php#defining-how-the-view-is-viewed) (see the bottom of the linked anchor) where the world is drawn to a view, and then it's drawn again but to a smaller view, the minimap.

Is there a better way to do it? It seems like it's not very efficient to draw the world twice? Or am I overthinking it
Title: Re: Is there a better way to make a minimap?
Post by: Laurent on November 10, 2014, 09:55:12 am
You can draw it once at loading time into a render texture, and reuse the produced texture with a simple sprite.
Title: Re: Is there a better way to make a minimap?
Post by: smguyk on November 10, 2014, 10:02:46 am
Nice idea, I'll do that. Thank you!