Topic: Production Time
WorldSavior |
Posted at: 2018-08-06, 18:13
Interesting...
No, the distance between 2 flags is always at least 2 units...
But this is in this direction equivalent to distance, isn't it?
I'm still convinced that I understand most parts of the geometry of Widelands Wanted to save the world, then I got widetracked Top Quote |
stonerl Topic Opener |
Posted at: 2018-08-06, 18:53
Sorry, I meant the yellow flags. When nothing is build. Not the one on the roads.
I don't question this at all. But I stopped the time with a stopwatch, many times. The worker from the north shipyard took 5.4 seconds to walk from the flag to the construction side. In contrast the one on from the west shipyard took 9 seconds. Please have a look at this video: The the worker from the west has a lead of almost 14 seconds. After the second build-phase they are equal. The first starts at 58 seconds and the second at 2:29minutes. (I had to crop the video, since a notification popped in...) Top Quote |
stonerl Topic Opener |
Posted at: 2018-08-06, 21:35
I'm sorry if I annoy anybody, but I had to make some drawings to understand the problem. Since I'm not a programmer myself I cannot look in the code and spot every detail but I think I understand how and why this works currently. As far as I understand it, tiles consist of an hexagon with a seventh knot in the middle: The distance from evry knot to its neighbor is 1 vector. The problem is how roads work. Although the distance from A to E is 1, it can only be reached using the auxiliary knot G (or F). So that distance increases from one to two. On the horizontal axes every neighbor can be reached within 1 vector. But on the vertical axis two are needed. Back to the problem with the shipyard. The shipyard's flag is knot B. Since the minimum distance under normal circumstances is 3 knots, the closest knot for the construction site would be O. Since roads cannot be constructed between neighbors in the vertical axes, and the workers can only walk on paths that can be converted into roads, the worker has to use the auxiliary knots C and J. Knot O is indeed a 3-way-hop and the closest distance. But not the shortest to reach by roads. This would be J. Is this correct? Edited: 2018-08-08, 23:41
Top Quote |
hessenfarmer |
Posted at: 2018-08-06, 22:08
from a coordinate point of view (x, y) the distance between A and E is 2 cause their y value differs by two. to get an impression about the coordinate system simply open the map editor and see the x,y readout while the cursor moves. Top Quote |
stonerl Topic Opener |
Posted at: 2018-08-06, 22:49
@hessenfarmer: thank you for the clarification. @WorldSavior: I beg you pardon for the misunderstanding. Top Quote |
kaputtnik |
Posted at: 2018-08-07, 07:58
stonerl, you may take a look at these pages: Fight simulator for Widelands: |
WorldSavior |
Posted at: 2018-08-08, 12:39
No need to be sorry. The distance between two yellow flags on the north-south-axis is at least 2, it cannot be 1.
I didn't want to say that you question it, I just wanted to express that I'm rather sure about the issue.
In the video, there are two different distances: 3 and 5.
No? A road can go from A directly to B. You mean E instead of B.
No, J.
Not completely. distance(B,O) is not 3, but 5. Maybe this helps you: A sentry has a conquer radius of 6. It conquers every field within a radius of 6. Edited: 2018-08-08, 12:40
Wanted to save the world, then I got widetracked Top Quote |
stonerl Topic Opener |
Posted at: 2018-08-08, 16:11
@WorldSavior and @kaputtnik thanks allot for the link and the explanation. Now that I read the article about map geometry and your explanation I know where I made the wrong assumption. Thanks allot for your patience. Concerning the shipyard. Is this the intended behavior or a bug. One can force the shipwright to be build the ship in an 1 unit distance. On its own he builds the ship 3 units away when on the horizontal, but 5 when on the vertical axes. Which results in the following build times: 1 Unit: 20 minutes 43 seconds 3 Units: 22 minutes 39 seconds 5 Units: 24 minutes 34 seconds Which I think is not insignificant. Edited: 2018-08-08, 16:24
Top Quote |
einstein13 |
Posted at: 2018-08-08, 17:16
@stonerl we all had to get this hex-shaped map know first. It is much better when you calculate distances, because all of them are integer numbers. But this system is not trivial one and contains some tricks . Fortunately it can be transformed to square one with special conditions. And transformation contains pure math function, so you don't need to be IT specialist . But going to be human-friendly, what you posted above is enough to catch the point of hex/triangle map. einstein13 |
WorldSavior |
Posted at: 2018-08-08, 21:06
You're welcome
I think it's a bug if a shipyard always chooses high distances. I would even say that the shipyard should always pick the spot which is the closest. The disadvantage would be that a single shipyard wouldn't produce several fleets at several different waters without micromanaging - but this is an unimportant corner case and one could still place the shipyard exactly between the waters, so there would be a random choice. (Or one just builds several shipyards) Wanted to save the world, then I got widetracked Top Quote |