[solved] How can I draw a boundary line in world map?

0 favourites
  • 5 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • Some screenshots from other games:

    I attach a capx with the complete map (layer0) and the territories separated in images (layer1).

    (It's a quick example capx)


    What I need is to draw a line around all the territories of the same player.

    -No need to color the territories, the capx already does.

    -The players are capturing territories, so the border moves.

    Thank you

  • MTR

    I tried a few ideas I had, but didn't get very far...

    see this thread from 6 months ago where I made a sample that did something similar (but not outlining the total area):


    I thought you might be able to use scale to make copies of the occupied map pieces, tint them to the border colour you wanted and move them under the real pieces so just the over-all outer edges were visible, but because of the irregular shapes, scale did not produce an even outline. So, that means you will probably have to make two copies of each map piece - one without a border, and one with a border. And then have two layers of pieces - with the pieces with a border under the ones without. The main problem is what happens when two players' map pieces are side by side - which way does the border extend? if the border does not extend past the edge of the map piece, then you will need border pieces for each edge of each piece and work out what to show.

    you could also try putting image points all around the map pieces and use that to calculate where to draw a border, but that wont be easy either...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for your ideas AllanR

    "Set color": I already use it.

    For now I am using the effect "Outline"


    But I do not like the result:

    There is no problem in duplicating all the images, but I do not think this will improve the result.

    then you will need border pieces for each edge of each piece and work out what to show.

    Make an image of each edge is the solution, but it's... impossible. As you can see in the screenshot, it would be an exaggerated number of pieces for each map.

  • there may be a way to paste map pieces into a drawing canvas and then apply an effect to get an outline around the group...

  • Solution:

    I use plugin "Paster" and "Outline" effect.


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