Page MenuHomeWildfire Games

Only test spawn against entities that block movement
ClosedPublic

Authored by temple on Feb 18 2018, 6:53 PM.

Details

Summary

Units don't spawn on fields and foundations, even though they can walk on them. This patch fixes that.

Test Plan

Example in a22:

And here with the patch:

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

temple created this revision.Feb 18 2018, 6:53 PM
Vulcan added a subscriber: Vulcan.Feb 18 2018, 8:41 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/42/display/redirect

elexis added a subscriber: elexis.Feb 19 2018, 2:55 PM

On fields women usually work, so the player has some additional effort to separate the idlers from the workers.
I've tested building fields around the entire CC, then the units spawned on the lines where 2 fields meet.
Usually the player sets rallypoints anyway, it might only be annoying the player who isn't used to that.
I don't think that anyone will manage to run into the issue of not having sufficient spawn points.
So I don't have a strong opinion against the patch but also not a strong opinion for it.

I noticed it during one of our svn games. I had the rally point set in the upper left but it seemed like most women came from the other side. And indeed there was 4 + 1 women spawning on the upper left side, and then 3 + 10 in the bottom right where there weren't fields.

With Mauryan elephants (and the Ptolemy hero) it could be a problem, for example this was just a random placement of fields in a22. In a23 there's a smaller spawning area so it's easy to imagine with tighter field placement that there wouldn't be any room for large units even in the gap between fields:

elexis accepted this revision.Feb 19 2018, 5:27 PM

The unexpected distribution of spawning points is a valid pro argument.
The counter argument that the player now has to pick the units between the fields is invalid, because the player still has to do that, just now they are grouped.
(That default idle worker selection hotkey should be moved to F IMO)

There are two more occurrences of SkipTagObstructionFilter, all of the mare in this file.
We recall the partially duplicate function, you might want to consider updating these as well.
Didn't test.

This revision is now accepted and ready to land.Feb 19 2018, 5:27 PM
In D1308#53673, @elexis wrote:

(That default idle worker selection hotkey should be moved to F IMO)

(I've always used F for that.)

There are two more occurrences of SkipTagObstructionFilter, all of the mare in this file.
We recall the partially duplicate function, you might want to consider updating these as well.

That's only used for sinking ships so it's unlikely that fields or foundations are a problem. (I want to remove the function in D1039 but it's not worth arguing about.)

This revision was automatically updated to reflect the committed changes.