Pathfinding for ground units

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!

Pathfinding for ground units

Postby beholder33 » 19 Nov 2015, 15:50

I'm not very good at scripts so i will try to word my findings as simple as it's possible.

1. Trucks pathfinding, the most irritating is their path to assist a construction when there is 4 or more of them, blocked ones try to ram their friends, which already build the structure, in the butt with full force and ain't even thinking about going around it. Also trucks with medium and large body make it even harder as even 2 or sometimes 1 truck is enough to block the way for the other one wich is supposed to help with building ( as i wrote i'm not good with scripting but i would give a building truck different status, similar to non-mobile structure, so other trucks would recognize it as an obstacle and go around instead of ramming it pointlessly)

2. Military units pathfinding with automatic return to repair command, it's kind of obvious that units which drive in front of the column will take the first fire and most damage burst from enemy, if the return for repair command is enabled, at certain hp level they will simply turn back and ride right into their clone tanks faces blocking way in and out, stoping the whole column, often taking damage from artillery and not being able to return fire, resulting in more tanks turning around and blocking way untill whole batalion is dead. So my point here is to give "broken" tanks different status, same as i propposed with building trucks, that the column of full health tanks will try to go around and will see them as obstacle, while broken tanks will be free to go back to repair.

I hope such feedback is of any use, and I wanted to thank all those people who work to make this (one of the best rts) game even better.
Posts: 18
Joined: 24 Feb 2014, 01:19
Location: Poland /Ireland / Austria (depends)

Re: Pathfinding for ground units

Postby vexed » 20 Nov 2015, 05:58

The path-finding isn't script based.

Did you mean for this to be in 'Ideas and suggestions'?

I am moving it there, since it don't look like this belongs here.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
User avatar
Posts: 2358
Joined: 27 Jul 2010, 02:07

Re: Pathfinding for ground units

Postby beholder33 » 13 Mar 2016, 23:07

Nah, i simply thought that it's scripted so i had put this topic here, thanks for moving it then, since new version is released i will check on AI a little and will post an update in my suggestion if anything is changed, cheers for the hard work to all devs ^^
Posts: 18
Joined: 24 Feb 2014, 01:19
Location: Poland /Ireland / Austria (depends)

Re: Pathfinding for ground units

Postby Bethrezen » 15 Apr 2016, 01:08

This is a known issue and its one I have complained about before because its incredibly irritating when units get stuck continually and aren't smart enough to drive round or get out of the way.

unfortunately pathing is not so easy to fix if it was they would have sorted it already, what I find curious though is why they don't take my suggestion and just turn off collisions for retreating units so they can pass through obstructions granted its something of a dirty fix but at the very least it would help to alleviate this issue until someone works out how to fix this.

I'm no programmer so I could be wrong but from what I can tell just looking at the behaviour in game it appears as though the collision box for units is simply to big, what this means is that units are in fact bigger then they appear its not the first game I've seen with this issue

Dawn of War Dark Crusade has this problem as well although in Dawn of War Dark Crusade its a bit more obvious because when you build structures you can actually see the collision box that's the little pale blue box that appear round building when you are trying to place them and for some structures the collision box is far bigger than it needs to be the Tau Tank factory is one that comes to mind that suffers from this X3 Terran Conflict and X3 Albion Prelude are 2 more games that come to mind that suffer this issue.

Unfortunately until someone devises a solution players will just have to work around it.
Posts: 119
Joined: 25 Sep 2009, 02:05

Re: Pathfinding for ground units

Postby Vastor » 12 Jun 2016, 00:13

Can you give units multiple hitboxes that can be switched on and off?

Every unit has 2 hitboxes. One is the usual large bulky one, the other is much smaller (size = 30%-45%?).

The smaller hitbox interacts with all other hitboxes other than the large unit hitboxes of own team and allies.
Once a unit is retreating it switches the large hitbox off (only for unit collision), leaving only the small hitbox active.
This way it will be able to slip through, not phase through, the advancing tanks.

This would also make it easier for the unit to slip through enemy lines (enemy has to leave enough room for small hitbox to get through between large hitboxes), but if you are retreating, you dont want to engage the enemy, you just want to push through and get home.

If you don't want a fleeing unit to push through enemy lines, give it 3 hitboxes.
One large1 that interacts with own and allied large1 hitboxes and enemy large2 hitboxes. This can be switched off to retreat.
One large2 that interacts with enemy large1. This is always on.
One small that interacts with all small hitboxes.

This leads to:

You retreating, friendlies in way?
Swith large1 off, you can slip through.

You retreating, enemy in way?
Swith large1 one off, large2 still interacts with enemy large1 and you can't get through.

Enemy retreating, enemy in way?
Switches large1 off, he can slip through.

Enemy retreating, you in way?
Switches large1 off, large2 still interacts with your large1 and he can't get through.

You and enemy retreating with each other in way?
Both switch large1 off, only small can interact with each other, both units manage to get through.

In theory it should work with blobs of tanks.
First in line gets shot and drops to yellow health. He immediately stops and turns around for retreat.
All other tanks can continue onward since there is enough room between the smaller hitboxes to safely pass.
New user
Posts: 1
Joined: 11 Jun 2016, 23:38

Re: Pathfinding for ground units

Postby Vincent » 27 Aug 2016, 20:33

BTW there were some improvements in the AI fields by sortof coupling it with fluid dynamic that may help : ... crowds.pdf
Posts: 64
Joined: 06 Aug 2016, 17:24

Return to Ideas and suggestions