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

2019-02-16 Thread Toni Förster
I think I had an eureka moment. get_valuable_fields() is in a coroutine and gets calculated in the background. The sleep time can be adjusted, but I think 50ms is a good value. I tested 25ms which cut the time in half but the game was a little choppy. --

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

2019-02-16 Thread bunnybot
Continuous integration builds have changed state: Travis build 4482. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/494349394. Appveyor build 4270. State: success. Details:

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

2019-02-16 Thread Toni Förster
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

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

2019-02-16 Thread Toni Förster
You're welcome. The question though, should we really evaluate big fields? We currently stop after 10 fields, because I think 12 is too far away and adds fields that are only accessible under extreme circumstances. --

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

2019-02-16 Thread hessenfarmer
we are getting better, at least my machine (Core2Duo T7500 6GB) is able to calculate oasis triangle with about 14000 valuable fields. Problem is it still took 20+ seconds. I don't know the table beahviour in lua exactly, but if we could exclude/remove duplicates it would make sense to simply

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

2019-02-16 Thread hessenfarmer
confirmed this is killing old machines on oasis triangle. How about just checking the map for fields with maximum buildcaps small, medium, big, port, and mine. this isn't exakt as well but far less consuming. --

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

2019-02-16 Thread kaputtnik
Forgot to mention: Tested a release build. Here the output for map Glacier Lake: Starting get_valuable_fields: get_valuable_fields took: 6410ms 6 seconds sitting in front of a black screen ;) --

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

2019-02-16 Thread kaputtnik
This branch does not work for me on my poor laptop (Celeron 900 with 3,8Gb Memory). E.g. trying to load map Oasis Triangle will last forever while memory usage increases until no memory is available anymore. I have put a print statement at the beginning and the end of the function

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

2019-02-13 Thread bunnybot
Continuous integration builds have changed state: Travis build 4468. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/492822657. Appveyor build 4256. State: success. Details:

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

2019-02-12 Thread GunChleoc
Definitely. We should target it to Build 21 too. -- 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.

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

2019-02-12 Thread hessenfarmer
Ok but still this branch needs testing especially with regard to performance. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is subscribed to branch

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

2019-02-11 Thread bunnybot
Continuous integration builds have changed state: Travis build 4461. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/491840111. Appveyor build 4249. State: success. Details:

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

2019-02-11 Thread hessenfarmer
Ok I tested it and it is a completely logical behaviour: 1. the assert tests the size of a field object to ensure the preprocessor command to pack this struct was successful 2. before my changes this object had 10 bytes + 2 times the standard address width (sizeof (void*)) 3. I added a property

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

2019-02-11 Thread hessenfarmer
the check for WIN32 is an ifndef check so in fact the check for Windows is less strict. My code adds a new property to the field struct so I believe it is increased in size and therefore the check for all other Systems than Windows fail due to the more restrictive size check. As these

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

2019-02-11 Thread GunChleoc
The check under Windows is more strict, so unifying the check will not make the assert error go away. The roper fix is to understand what the problem is - I expect that there is a reason that somebody put that assert there and that there is a bug in the new code. --

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

2019-02-11 Thread hessenfarmer
The check that is failing is checking whether a field instance is tightly packed. (whatever that means) However the reason for Linux failing while appveyor / MSYS2 not failing is that this check is defined different for a WIN32 system as for the other systems. The reason for this is unknown to

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

2019-02-11 Thread hessenfarmer
I didn't know about this as I use a MSYS2 Environment (like Appveyor) where it compiled and worked. Unfortunately my C++ knowledge is very limited, so I am not sure how to fix this. If anyone of you knows what is going on there feel free to correct it. I will try to do so as well tonight.

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

2019-02-10 Thread bunnybot
Continuous integration builds have changed state: Travis build 4453. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/491252805. Appveyor build 4241. State: success. Details:

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

2019-02-10 Thread Toni Förster
Review: Needs Fixing @hessenfarmer I can't compile your changes, Travis isn't pleased as well. /src/logic/field.h:261:1: error: static_assert failed "Field is not tightly packed." static_assert(sizeof(Field) == sizeof(void*) * 2 + 10, "Field is not tightly packed."); ^

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

2019-02-09 Thread GunChleoc
elands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help

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

2019-02-09 Thread GunChleoc
-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https

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

2019-02-08 Thread bunnybot
/_widelands_dev_widelands_bug_1810062_territorial_calculations-4213. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations

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

2019-02-02 Thread hessenfarmer
~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help

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

2019-01-14 Thread hessenfarmer
ly problem is I am short of time -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial

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

2019-01-11 Thread Toni Förster
in my last comment, that wasn't my intention. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations

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

2019-01-11 Thread hessenfarmer
:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https

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

2019-01-11 Thread kaputtnik
://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands

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

2019-01-11 Thread hessenfarmer
if they are reachable But I don't have a proper solution how to achieve this yet. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug

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

2019-01-10 Thread Toni Förster
und with the editor to get a better understanding. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widel

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

2019-01-10 Thread hessenfarmer
/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: https

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

2019-01-09 Thread Toni Förster
ial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev P

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

2019-01-09 Thread hessenfarmer
start playing while the calculation is done in the background. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial

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

2019-01-08 Thread kaputtnik
-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: htt

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

2019-01-08 Thread hessenfarmer
/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list

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

2019-01-05 Thread kaputtnik
g-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands

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

2019-01-05 Thread Toni Förster
If someone has a neat idea on how to speed this code here up... I guess math would help :-) -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/wid

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

2019-01-05 Thread kaputtnik
-- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. _

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

2019-01-04 Thread Toni Förster
nds on my system, since it has so man empty fields. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-ca

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

2019-01-03 Thread bunnybot
/_widelands_dev_widelands_bug_1810062_territorial_calculations-4174. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations

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

2019-01-03 Thread Toni Förster
ds-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: h

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

2019-01-02 Thread bunnybot
/_widelands_dev_widelands_bug_1810062_territorial_calculations-4171. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations

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

2019-01-02 Thread Toni Förster
buildings to calculated territory. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands. ___ Mailing list: https://launchpad.net/~wideland

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

2019-01-02 Thread Toni Förster
The proposal to merge lp:~widelands-dev/widelands/bug-1810062-territorial-calculations into lp:widelands has been updated. Description changed to: This adds fields covered by trees, stones, artifacts and buildings to calculated territory. For more details, see: https://code.launchpad.net

<    1   2