Warzone2100 / old-trac-import

Archived Import of (old) Warzone 2100 Trac
0 stars 0 forks source link

pickStructLocation() tweak for FACTORY and CYBORG_FACTORY #3747

Open wzdev-ci opened 11 years ago

wzdev-ci commented 11 years ago

keyword_choke_point keyword_location keyword_pickstructlocation keyword_placement keyword_spacing keyword_structure keyword_traffic_jam type_to-do (no feature requests!) | by aubergine


For AI's, I don't think one space around land unit factories is enough to prevent traffic jams in bases.

Screenshot of a traffic jam: http://forums.wz2100.net/download/file.php?id=12523&mode=view

Could pickStructLocation() be updated so that FACTORY and CYBORG_FACTORY require a border of 2 empty spaces rather than the current 1 empty space? This will ensure that there's more room around these factories, reducing base traffic jams.

Also, if the adjacent tiles were checked to make sure they are mostly flat (very low incline/decline) it would reduce chances of factories being placed too close to base entrance or on narrow land strips next to water / hill terrain.

While this won't solve the problem of narrow terrain choke points causing traffic jams, it will significantly reduce traffic jams within and around bases. I imagine it's a relatively easy change to make (the slope detection might be harder tho?) even for RC 4 - it could give the 3.1 branch a decent reduction in traffic jams, making NullBot much more effective at getting its troops on to the battlefield.


Issue migrated from trac:3747 at 2022-04-16 10:39:32 -0700

wzdev-ci commented 11 years ago

NoQ commented


I think in wzscript there used to be a parameter for that (how many free spaces need to be in this particular call), even though it wasn't used very often.

wzdev-ci commented 11 years ago

Per commented


Can you attach a savegame with this kind of traffic jam for testing, if you have?

wzdev-ci commented 11 years ago

aubergine commented


I don't have a savegame unfortunately, will try and create one next time I see the problem.

The problem seems most common when there is a repair facility in the base (thanks to NoQ for suggesting I look for that). In this scenario, newly produced units are roadblocked by units coming for repairs, and suddenly the base turns in to a massive traffic jam.

I still feel more space around land-unit factories (and repair facilities too probably) would give a reduction in base traffic jams.

Also, the ability to have more space would make it easier to spread base defences out a bit more - so I think a "spaces" or "gap" param would be useful regardless of the traffic jam issues.

wzdev-ci commented 11 years ago

vexed commented


Is it any better in 3.1.0 ?