Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Is there a better way to make a minimap?  (Read 1887 times)

0 Members and 1 Guest are viewing this topic.

smguyk

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Is there a better way to make a minimap?
« 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 (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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Is there a better way to make a minimap?
« Reply #1 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.
Laurent Gomila - SFML developer

smguyk

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Is there a better way to make a minimap?
« Reply #2 on: November 10, 2014, 10:02:46 am »
Nice idea, I'll do that. Thank you!