Turf Edges |
||
Automatically generates edge icons for turfs and places them on the map. [More] |
To download this demo for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Forum_account.TurfEdges##version=2 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Forum_account.TurfEdges##version=2 |
This demo contains code to generate edge icons for turfs and to automatically place them on the map. It generates an 8-directional edge icon for each icon state. You can specify a custom mask icon to determine how exactly one turf will blend into the next.
Here's an example. This is the map without edges: And this is the same map with the edges generated by this demo: All you have to do is generate the edge icon state and set the edge_layer var for each turf. |
KururugiSuzaku: (Aug 9 2012, 8:19 am)
Wow, a really great and useful library. Thanks FA.
Forum_account: (Feb 15 2012, 8:06 am)
I just updated the demo to change the way edges are added. The old code is still in there, it's just commented out, in case you want to use the old method. The change removes some redundant edges, for example:
+---+ If you're adding edges around both of those tiles, turf 1 would get edges on 7 sides (all but south) and turf 2 would get edges on all sides but north. The northeast overlay added to turf 2 would overlap turf 1's southeast overlay. With this update, turf 1 would only get 5 edges (west, northwest, north, northeast, and east) so it doesn't have any overlays that overlap turf 2's edge overlays. Kisioj wrote: Forum_account, you are doing fantastic job! Whenever I look for some new and good quality libraries and demos, I first go there: http://www.byond.com/members/Forumaccount?tab=creations Thanks! That's always good to hear =) RoffleBunny: (Feb 12 2012, 6:02 pm)
So beautiful like most of your contributions, forum_account. Thank you.
Kisioj: (Feb 12 2012, 3:47 pm)
Forum_account, you are doing fantastic job! Whenever I look for some new and good quality libraries and demos, I first go there: http://www.byond.com/members/Forumaccount?tab=creations
Forum_account: (Feb 11 2012, 4:14 pm)
Branks wrote:
Dude. You are a savior. This is very useful for a project I'm working on. Glad to hear! |
Copyright © 2024 BYOND Software.
All rights reserved.