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
413
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
Reaction score
963
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
413
>_>

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
52
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
Reaction score
963

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

  • TD_Pic.jpg
    TD_Pic.jpg
    118.7 KB · Views: 298

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:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top