ID:155415
 
What would be the best way to handle a tile edging after the terrain has been randomly generated?
If you're confused, this is what I mean.

Say we have two blocks generated next to each other, like so:
     ###
######
######
###


And after generated, it becomes this:

    *****
*###****
*######*
*######*
****###*
*****


How would I put a small border around those blocks to make them look unified rather than clash against the background?
Remember: Each pound sign is a PIXEL, not an entire entity.

Any ideas? This would greatly help me.

You could set * to 50% alpha, that way it'll blend a little with background.
In response to Zaoshi
That wouldn't help. Because that's not the only thing I really want with this edge generation. I'd like shading and different colors as well.
In response to Oasiscircle
If you make 50% alpha it'll blend with pixels in the background. If that's not what you want I don't understand what you want :(
In response to Oasiscircle
Why not try remaking them as 1 object after they've connected and have that little overlay over that?
Assuming your icon doesn't extend all the way to the edges, this would work, though I caution against using it frequently:

var/icon/I = new(original)
var/icon/J = new(original)
J.Blend("#ffffff", ICON_SUBTRACT)
var/icon/K = new(J)
for(var/dy=0, dy<=2, ++dy)
for(var/dx=0, dx<=2, ++dx)
if(dx!=1 && dy!=1)
J.Blend(K, ICON_OR, dx, dy)
// If you want to change the color of the outline do it here via SwapColor(); right now it is black

I.Blend(J, ICON_UNDERLAY)


This routine should be able to lend itself to client-side icons, if the original icon is saved in the cache. If the original is an /icon datum itself, all bets are off.