Anti-Walling Algorithm

This algorithm is designed to work with any set of walls, regardless of position or number. All you need to do is tell it which walls are where. It only works for 2x2 regular blockers right now. If you need something more complicated (i.e. multiple radii), I can probably make it.

When a building is created, a search is conducted for nearby buildings with custom values or adjacency, that is being next to a wall. If it is either of these, it is either given the custom value of the building adjacent to it or the wall adjacent to it. If it's not next to anything, it is given the custom value of zero. Then, it looks for nearby buildings which do not have custom values. If a building is to be given two custom values or a custom value of -1, it is prevented. Alternatively, if the SCV is literally on top of the build site, since Blizzard gave no way to delay building, the new building is removed and the player is given a total refund.

This algorithm is much faster and more efficient than its competitors, since it needs to only make one check each time. It's also very easy to use, since you need only write where buildings can't be built and reassign the spell to your build spell if it isn't already that.

It also comes with a much less efficient remove function which allows for removal of maze structures without issue. This function works by unassigning all of the towers that were adjacent to the one removed and so on and placing the ones adjacent to walls in a separate group. It then re-expands from the walls to make it like it was before. This occurs very, very quickly as well. This is set to happen when any building dies.

Download

File Name Status Version Downloads Date
Anti-Walling Test Map R - 307 01/08/2010
Anti-Walling Algorithm
Anti-Walling Algorithm

Dear youtuber!
Have you a channel youtube and want to bring your Video to quality visitors?
Do you want your video to appear on our website?
Do you want to become partner with us?
Just 3 steps to become our partner:
Step 1: Make video review for mods, addons, plugins, ... which you like
Step 2: Upload this video to youtube and our link to your video description
Step 3: Send the youtube video link via message to http://fb.com/9lifehack or leave a comment in the post. We will add your video in the our post, it will help you have more view.
JOIN to get more youtube view with us!!!!

Related Posts

Smarty Productivity Happiness

9LifeHack.com - make things smart