• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help with pathing and collision for a Tower Defense (Maul)

Status
Not open for further replies.
Level 1
Joined
Jun 16, 2013
Messages
5
Hi,

I'm currently experiencing a problem with a Tower Defense (maul) map I'm making where the enemy units keep clumping up in a large blob, getting stuck (temporarily) and taking ages to move through the map.

I compared my map to a very similar open source map (similar terrain, same number of units per wave) which did not have this problem and made changes. However, the problem still remains on mine despite the movement triggers and unit values being basically the same. I've already set Collision to zero and movement type of Hover.

The only thing that did make a difference was giving the enemy unit the ability "Ghost (Visible)"; however this is far too drastic as the units just layer on top of each other and make the TD impossible (without splash). The Open Source map doesn't use this ability either and the units there move fairly smoothly.

Has anyone got any good ideas about what I might be missing here? Thanks in advance.
 
Level 1
Joined
Jun 16, 2013
Messages
5
Split the spawns between multiple creep "players".

Instead of just player 12, you can use for example player 9, 10, 11 and 12.

There are also 4 neutral slots:
Neutral Hostile
Neutral Victim
Neutral Extra
Neutral Passive

This would require an overhaul of a TON of triggers so I'd rather leave a solution as a last resort if possible.

Thanks though, it's something to consider if I don't find out how the open source map managed to make the movement smooth.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
I'm pretty sure that is the best solution. Also since u say u have a lot of triggers u should look at making ur triggers as efficient as possible. I have a map with 8 players. It's a maze style map with 7 points that the enemies move over. I use one trigger for all moving. So it sounds to me like u have an inefficient trigger.
 
Level 1
Joined
Jun 16, 2013
Messages
5
I'm pretty sure that is the best solution. Also since u say u have a lot of triggers u should look at making ur triggers as efficient as possible. I have a map with 8 players. It's a maze style map with 7 points that the enemies move over. I use one trigger for all moving. So it sounds to me like u have an inefficient trigger.

Ok, I'll look into giving it a go. Out of interest, how does having two different "players" affect the collision compared to having two different unit groups for one spawn within the same faction.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
There is a max amount of orders that one player can give at a time. Lets say this is 10 (it's not 10 it's just an example.)
When a player has 25 units spawned it can only order 10 of them to move then. So they start to bunch up because of that. Splitting it up splits the amount of units that player has moving at one time.

As for trying to make ur triggers more efficient look at my tutorial things a GUIer should know. Also look at the things that leak tutorial in case u don't know about memory leaks with wc3
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Note that the maximum amount of orders per player seems to be something like 1 per frame.

With fast units it means some unit logic lags if you have over 60 units or so.
If you have very slow units, then you can have like 100 or so.
It probably depends on something more.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
If it was only 30 then u could never have 50fps which does happen.
The video speed is slower than the processing speed but the processing is higher than 30 otherwise when u tried a loop at .01 it would crash the game because that is 100 frames.

Okay, you were right about 0.01 working.

Anyways, the graphics are something like 30 FPS standard. They can be drawn faster, but it loses meaning.
It seems that logicFPS is faster. I tried something and a 0.01 loop did run 100 times per second.

EDIT: At 10 000 loops per second things start to break. Probably due to real inaccuracy.
 
Level 1
Joined
Jun 16, 2013
Messages
5
Hi all,

Thanks for your advice. I have implimented this system and it has had an impact.

One question though: is it more effective to move a large number of units (80ish) within a small number of unit groups (5) at the same time or a smaller number of units (20) within a larger number of unit groups (15) at the same time? Or does it make no real difference?

Thanks.
 
Level 1
Joined
Jun 16, 2013
Messages
5
What I mean is, I have a total of around 300 units that need to be moved each round for my tower defense. I split these units into Unit groups depending on their position and then order those unit groups to perform certain movements.

However, I have the ability to split them into a large number of unit groups (so the number of units in each one is fairly low) or into a few big unit groups.

Therefore, I was wondering whether either of these options would provide more fluid movement.

The numbers were just bad approximations on my part.
 
Status
Not open for further replies.
Top