Creating a minimap using the same tile data as the level

0 favourites
  • 7 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • I'm currently attempting to create a minimap that looks something like the one pictured here:

    http://wip.warpdoor.com/content/images/ ... n_shop.png

    I'd like it to be a 1:1 representation of all of the tiles on my randomly generated map, with each tile taking up a single pixel, which would make it around 160x160 pixels. To accomplish this, I'm using a tilemap where the tiles have a height and width of 1.

    The problem: This seems to cause a performance issue. Under the Profiler, I can see that having this minimap on the screen causes my Engine usage and Draw Calls to double or triple, which in turn makes the overall CPU usage much higher-- enough to potentially cause frame rate issues.

    If there is some alternative solution to creating this sort of minimap, I'd love to hear it. Considering the minimap is static for the duration of the level, it seems like there must be a more efficient way to accomplish this within Construct 2 than displaying an entire tilemap on the screen.

  • Are you by any change having the map be created every tick instead of once?

  • Nope, just once. Having the whole 160x160 tilemap appearing in my GUI layer is enough to cause the performance issue.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi! May I ask how you made the minimap? Madguy

  • As of right now, I haven't found a workaround for this particular issue. It's pretty annoying. You've basically got two options here to produce this sort of minimap-- place a bunch of tiny sprites on the screen, or use a tilemap. And both methods are memory hogs. I'm currently using a Metroid-style minimap, which is a lot more efficient, but also lacks the level of detail I was hoping to have.

    It would be great if Construct 2 had some sort of way to just draw pixels to the screen, or create a custom sprite on the fly, or make modifications to an existing sprite.

  • I made a quick example of how you could use Rojo's canvas plugin to show the static minimap. I think I've got the same dimensions as you mentioned in the post.

    [attachment=0:20ee21iw][/attachment:20ee21iw]

    And the plugin is

    HERE

  • Oh fantastic! I was not aware that this plugin existed-- that's exactly what I was looking for! Thanks so much!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)