TD Blockage system, any suggestions?

Inflicted

Currently inactive
Reaction score
63
okay im looking for the simplest method possible, but i have a TD with like mazing and all that.

i want so that the creeps run around the towers and through to the endzone.

BUT if a player blocks and the creep is unable to reach the end i need some sort of method to make towers become destroyed so that it is able to get through.

the method could be that the creeps attack or that its triggered destruction.
only problem i have with them attacking is that i dont want the creeps to destroy the whole maze, just the part they cant get through.

any suggestions? all comments are apreciated except the "negative" ones. thanx

---------

sorry for editing just wanted to show my current blocking system i made, it works but i dont like how it works so much, lil inefective.

i triggered it so that an invisible unit is made that runs through the maze, and if it cant get to the endzone in 30secs then 4 random buildings *explode*.
only prob is that 30secs is long, and they could like block for 25seconds and then open to let through or whatever and then theyv killed the wave cos they are immobile.
i thought of maybe making the time shorter, but if someone has a long maze it might not be able to get through in less time than that.

so im open to any fresh ideas :)
 

Sevion

The DIY Ninja
Reaction score
424
You could do it the way LTW does it.

Have a "Referee" run through and do a periodic check that if its current order is "Stop", order it to attack the nearest player's tower and move to the end again. (And order units around it to move too so they don't get stuck).
 

Moridin

Snow Leopard
Reaction score
144
I was actually thinking of making a pathing system in GUI for this :p.

Well, a typical suggestion is to have a kind of maze runner unit, move through the maze and if he can't get through the tower nearest to him gets destroyed (opening the maze up a little more). However, I don't really recommend this (because I personally have exploited similar systems in such a way that I can get past it).
 

Tyman2007

Ya Rly >.
Reaction score
74
Well, there is a method.. Simple to codeS Maybe.. The way a maze blocking system would work is using "Chains".

The only way that if there's a block is if the chain of the towers reaches from one side to another. When you build a new tower, the chain will try and detect if the length of the tower chain is greater than or equal to the distance between side A and side B. Here's some examples.
figure that each S is the size of 100.

S = blank piece
S = wall
S = valid tower placement
S = invalid tower placement (Blocker)

SSSSSS
SSSSSS
SSSSSS
Here's our maze, or "Pipe". the distance from side A to side B is 400.
Let's build a tower.

SSSSSS
SSSSSS
SSSSSS

Building that tower started a new chain because there are no towers touching that tower diagonally, vertically, or horizontally. Let's build another one.

SSSSSS
SSSSSS
SSSSSS
this is where some systems make a mistake at, but when we built another tower, the tower we built is not connected to the chain. A new chain is created. So far, each chain is a distance of 100.

SSSSSS
SSSSSS
SSSSSS
building that new tower had connected the 2 chains. There is only 1 chain now. Seeing as how we're measuring from left to right, the distance is 200, although there are 3 towers.

SSSSSS
SSSSSS
SSSSSS
The new tower I built had added an additional 100 to the chain. The length of the chain is now 300.

SSSSSS
SSSSSS
SSSSSS
When we built that new tower, it added an additional 100 to the chain. Seeing how the distance between the 2 sides is only 400, and we have a chain the size of 400, the tower that was freshly built has to be the blocker and is in turn destroyed.

Using this method we can create a few triggers.. One to check when the tower is built, one to check the length of the chains, and one to decide what to do with the new tower.
 

Romek

Super Moderator
Staff member
Reaction score
962
Related Thread
Tyman2007 explained it a lot like I did in that thread (though that thread has some other related discussion).
 

Sevion

The DIY Ninja
Reaction score
424
>_>

Lots more code for something so simple. A runner will suffice... But do with it what you will. It's your map.
 

Don

Rise with the Fallens!
Reaction score
51
Simply allow 1 attack for your ''Wave units'' and order them to simply ''move'' from one region to another. If they can't find any way to get there, they will destroy a tower. Then, you can recall the order with hashtables with the event ''a unit dies'' and condition ''unit is a structure=true''. That's what I do when I make TDs and it works really fine :p
 

Inflicted

Currently inactive
Reaction score
63
ty for all suggestions.

um Tyman2007 could you possibly give a demo map cos im sorta understanding what your saying, but i'm not to sure how to trigger it to destoy a building.

the creep attacking thing does work, but i dont like the fact that it could attack the wrong towers or destroy all of them, ag its just very messy. I'd rather have a system that sells or destroys the 'blocking' tower. referee works but its the same kindof problem.

thanx tho
 

Romek

Super Moderator
Staff member
Reaction score
962

Inflicted

Currently inactive
Reaction score
63
ah the system is perfect. but i only have one problem, my maze has an entrance and and ending that has a smaller part to go through, how would i make it so that if its blocked upwards or just the entrance it would destroy the building?

like this:

S - empty spot
S - entrance/wall
S - tower
S - tower that should be destroyed if built

SSSSSSSS
SSSSSSSS
SSSSSSSS
SSSSSSSS

or likewise at the top, another prob could be doing it downwards like:

SSSSSSS
SSSSSSS
SSSSSSS
SSSSSSS
SSSSSSS
SSSSSSS

if you understand what i mean, its quiet a problem.

---

any suggestions?

---

EDIT: ah i found a long method that works, just made a whole lot of triggers/regions and said if there is a unit in that region then the boolean variable would become true, and check so everytime a building is constructed. if all are true, destroy the building. this works, but will take long for all 10 players.

is there any other methods that might be simpler?

---

EDIT again: problem with that, check second image. i cant seem to provent that. any ideas?
 

Rushhour

New Member
Reaction score
46
What about something like an "ant algorithm"? When a new tower is constructed, start at the Start , where the creeps spawn.

Then you need to move from this point into every four directions and create new points there. The offset should be half of the minimum tower size. Will need some experimentation.
From each of these points do the same in again each four directions (well, do not go in the direction the point came from).
Always check if these new points are already part of your growing system. If they are blocked by something stop going on from this point.

Well and as soon as one path reaches the target you know (the shortest) path and you could also highlight this with some cool special effects :D

I could later try to code something like this in jass, maybe overthink the concept,... but I got no time now, sorry ;) have a try
 

Rushhour

New Member
Reaction score
46
I got something working.. but right now it needs some seconds to calculate since I overrun the operating limit, and starting new threads is only possible with a small pause...

also the hightlihting of the path doesn't work as I want it right now^^

will do it the next days after work
 

Rushhour

New Member
Reaction score
46
Could you please describe how your pathing will look like? So if the place where players build towers is surrounded by cliffs/unpathable objects, ...

It's difficult if not impossible to build an algorithm that is 1. fast (since the operation limit is easily overrun) and 2. efficient and accurate for every situation.
 

Inflicted

Currently inactive
Reaction score
63
it has cliffs around the area, i put pathing blockers so that the units cant run through the area that is unbuildable.

it looks like those "diagrams" that i have shown on previous posts, but not exactly proportional dimentions.

i will put up a screenshot when i get home later.
 

Inflicted

Currently inactive
Reaction score
63
Sorry for double post, dont think i can edit and add a pick with my rep :/ lol

here's the pic, i can get dimentions too if necesary.
 

Attachments

Strilanc

Veteran Scripter
Reaction score
42
If players can build during the rounds, detecting no-path situations is not enough. Players can open/close opposite exits to keep runners going in circles without ever fully walling. In that case it's best to ignore detecting walls and instead detect runners backtracking.

I used to play Cube TD and I would abuse the open/close technique whenever things got desperate.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Chile was a photographer but they are long gone from the site and doing other stuff now
  • Varine Varine:
    Well one of them is like six months, and I think his other daughter is like five or six? Like, young enough he shouldn't have drugs around anyway.
    +1
  • Varine Varine:
    So my side business is doing home archives, like digitizing and restoring old photographs and negatives, so I'm looking for like a DSLR that can do good macro photos
  • Varine Varine:
    I have some special scanners for slides and negatives, but they are kind of limited when it comes to some types of film, so I'm thinking I can set up a kind of projection system and just use a good camera to capture some of them if I need to.
  • Varine Varine:
    So I'm just looking for recommendations, because I'd like to not spend more than like 800 dollars if I don't have to, which seems to be lower midrange for DSLR. Should I bother with something like that, or just wait and plan on spending a lot more?
  • Varine Varine:
    I know I need at least 24 megapixel because I need to be able to capture the film grain because that's kind of a thing I advertise about, and my admittedly very fast math and a guy on Reddit told me that's what I need
  • Varine Varine:
    I know a lot about film, I don't know shit about digital cameras
  • Varine Varine:
    I'll also probably need to set up a server at some point because these scans take up a huge amount of space. I'll worry about that when I have an office though
  • The Helper The Helper:
    I am sure Ghan could give you some solid advice on the Server stuff
  • The Helper The Helper:
    I hear that the latest IPhones and Samsungs have some of the best cameras out there.
  • jonas jonas:
    phone cameras are good for sending pics on whatsapp, but no good for macro photography
  • jonas jonas:
    I think you should buy a used macro lens, do you already have a system camera?
  • Varine Varine:
    No, I'm still looking into them and kind of leaning towards a Rebel T7 at the moment because it's pretty cheap and lenses seem pretty easy to come by. Used ones are only like 3-400 dollars, which is much cheaper than I was planning
  • jonas jonas:
    I can't really recommend you any specific lens or body due to lack of knowledge, but in my experience camera shops are very helpful, especially those that also sell used parts
  • Varine Varine:
    There's only one camera shop in my town and they seem to specialize in film, but I have time before I need it. I'm not in a rush so I'll keep researching them
  • jonas jonas:
    I think since you have such specific needs, you should find a way to give a try for different systems without having to commit to one
  • jonas jonas:
    It would suck to spend 400$ on a system that doesn't have the capability you need
  • jonas jonas:
    and it will probably take a couple of tries to get the settings right
  • Varine Varine:
    It would but I can also just make sure I can return them. The system I have works, it's pretty straightforward and I tested it with a camera I have. All it really is is a little cartridge that holds the transparency film and a white light source behind it that projects the image into the lens
  • Varine Varine:
    I'll have to fuck with the light a bit and try some different lighting methods to get color accuracy, but I have IT8 targets for that
    +1
  • The Helper The Helper:
    get that color accuracy :)
  • Varine Varine:
    They're really helpful for calibrating things because I'm really colorblind, so I'm not great at doing it by eye
    +2

    The Helper Discord

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top