← Back to team overview

widelands-dev team mailing list archive

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

 

I think I found the sweet-spot. It is a radius of 6 for medium and big buildings. Let me explain: Before hessenfarmer introduced the max_caps we had to calculate up to 12 fields to make sure the immovable was accessible. This isn't the case any more. Here are some maps I tested with different calculations on my system:

Glacier Lake:

 6 fields b/m: 0:07 min - 3598 fields
 6 fields all: 0:06 min - 5196 fields
 8 fields all: 0:08 min - 5464 fields 
10 fields all: 0:08 min - 5829 fields

3598 fields is the perfect value  all others are still to high.

The Oasis Triangle:

 6 fields b/m: 0:42 min - 10520 fields
 6 fields all: 0:39 min - 11910 fields
 8 fields all: 1:02 min - 13652 fields 
10 fields all: 1:26 min - 14208 fields

The Nile:

 6 fields b/m: 0:59 min - 39551 fields
 6 fields all: 1:00 min - 39626 fields
 8 fields all: 1:10 min - 45474 fields 
10 fields all: 1:36 min - 47766 fields

Astoria 2R:

 6 fields b/m: 0:15 min - 42535 fields
 6 fields all: 0:15 min - 42400 fields
 8 fields all: -:-- min - 42605 fields
10 fields all: -:-- min - 42610 fields

The first 3 are maps that are to big because they use wrong assets. Astoria on the other hand only suffered from fields with immovables not being counted.

The calculation time for big maps with vast wastelands is still high, but maybe we could move the calculation in a parallel thread as hessenfarmer suggested.

Or we could move the initial calculation to the load screen. With a message like: "Calculating win conditions...", if possible.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1810062-territorial-calculations.


References