← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands


some more ideas to speed it up:
1. use the region lua command instead of going through the quadrant coordinates. 
a) first it is working in a circular manner which reflects better the conquer radius. 
b) Second it will not evaluate the superfluous corner fields (which are lot in a radius 12 case). 
c) Third it can be used in tranches from the inside to the outside using r1 and r2 which will allow to break the calculation as soon as a nearby suitable building will be found. 

2. we might reconsider which field is valuable (in my perspective just walkable fields are not valuable, only if there can be build a flag/road) which might reduce the number of fields to be calculated in total. 

some problems of the algorithm to be suitable for every map:
1. taking seafaring into account currently all small islands will be counted as long as there are two building spots, although they won't be accessible due to no port.
2. same is for hidden valleys in the mountains or similar.

one question:
are you sure that an immovable on the map will hide a caps. in my understanding of the documentation f.immovable is independent of has_caps. 

Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands.