#3334 closed defect (fixed)
[PATCH] Big houses have too small territory radius
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 19 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
On a17 and a18 you could progressively expand your territorry with houses. While this still works with small houses (especially for the celtic ones), it doesn't work anymore with big houses (as of r16847), since the territorry ends somewhere inside of the house or just after the footprint. This can be a big disadvantage in comparison to celtic players. For example on maps where you can only extend with houses but not barracks, like snowflake searocks or some unknown land / unknown nomad maps (where all the wood is in the middle and CCs are surrounded by mountains).
big house in a18:
big house on svn
I'm not sure which revision has changed the territorry computation, maybe it was r16676?
An easy fix / workaround might be to slightly increase the radius for big houses.
Attachments (6)
Change History (15)
comment:2 by , 9 years ago
Description: | modified (diff) |
---|
comment:3 by , 9 years ago
Keywords: | review patch added |
---|---|
Owner: | set to |
Summary: | Big houses have too small territory radius → [PATCH] Big houses have too small territory radius |
by , 9 years ago
Just Template Tweaking. I created a big house template, to make it easier in the future.
by , 9 years ago
Attachment: | screenshot0290.png added |
---|
Range of 23 as you can see it's messed up for some reason, which probably explains why little houses have less issues. So this is not likely to be a radius bug, but more a computational one.
comment:4 by , 9 years ago
Keywords: | review removed |
---|
by , 9 years ago
Attachment: | t3334_floatingpoint_territorry_radius_v1.patch added |
---|
Fixes the actual cause of the problem.
comment:5 by , 9 years ago
Keywords: | review added |
---|---|
Milestone: | Backlog → Alpha 19 |
Priority: | Should Have → Must Have |
Stan found out that it was caused by the change in r16751 line 425 of the CCmpTerritoryManager.cpp
.
In a18, that radius
value was 5
, currently it is 2
in svn. By changing the radius in templates you can make it either 2
(way too small) or 3
(way too big), by typing something below 24 or bigger than 24 respectively.
If give that value a floatingpoint type, that value will become 2.5
(notice its exactly half of the previous value) and the territorry influence will be the way it was before!
by , 9 years ago
Attachment: | t3334_floatingpoint_territorry_radius_v2.patch added |
---|
We can't use float
/double
in the simulation as the values might slightly differ on different platforms and thus cause out-of-sync. Thus we continue to use u32
.
by , 9 years ago
Attachment: | t3334_precise_territory_radius_v3.patch added |
---|
Uses u16
for radius
as that value should be smaller than 1000. Thus we can safely multiply it 28 without causing overflows.
comment:6 by , 9 years ago
Owner: | changed from | to
---|
comment:9 by , 9 years ago
Keywords: | review removed |
---|
I went for an easier solution. This also gives the falloff a better precision, while less conversions are needed. Thanks for finding the cause of the issue.
Also I noticed that the territory of the houses seems to be misaligned.
Some more pictures showing the territory of unconnected houses: