How do I correctly use Paster plugin for a minimap

0 favourites
  • 6 posts
From the Asset Store
$19.99 USD
MiniMap plugin, that allows for quick and easy implementation of an in-game map.
  • Hello,

    I'm trying to draw a minimap with the Paster plugin but I have difficulties.

    First I populate an array with random values for the map, and fill a tilemap in the same way at the same time.

    Next I run through the same array and draw 1x1 quads with a color for each value.

    The result is a minimap opposite of the real map. And some strange things I don't understand. I don't see any option to close path. Do I have to set the vertices of the quad ?


    What did I do wrong ? Something with the order I call Set Quad Color ?

    Edit : After testing, trying to run through a tilemap loop instead of array, trying to make two passes instead of one, I've seen unpredictable results. For example, if I disable the second color for the minimap, it works well. So it draws the quads at the right location, red 1x1 quad at black tile. But with the second condition, the results are wrong. If I set a first pass for the red quads at black tile, and a second for white quads at gold tiles, it makes some weird results. Really don't understand anything...

  • I took a look and the events look correct. I don't use webgl so if there's a webgl related issue I won't see it. The minimap was oriented correctly, but the colors were faded except for the right and bottom edge. I have no idea why that occurs, but using a "additive" blend is on solution.


    Fixed the faded issue in the plugin.

  • Hey R0J0hound,

    I was using WebGL, and the problem doesn't occur anymore when I disabled it. Everything is correctly drawn without it. So you're right it's related to WebGL. So what can I do ? I used the Paster plugin because of that, in comparaison with Canvas.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could go at it from another angle. You could use a 1x1 sprite and just paste that, or you could just use a tiny tilemap instead of the paster object. If the map doesn't change you could also use the canvas plugin, since it only has a performance hit with webgl if you constantly change the texture.

  • R0J0hound,

    I didn't think of tiny tilemap, or pasting a little sprite. Thanks for the tip.

    It is a bug in your plugin using WebGL ? Or does it come from WebGL only ? It's strange.

    Thanks for your help.

  • It's probably a bug in my code, but I can't test it without the webgl renderer being used.

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