Latest Posts

Topic: What are the rules that determine new borders when exchanging territory?

Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-04-25, 21:50

What would have been natural would be that all land goes to whomever is closest to it.

Now that would be counter-intuitive, IMHO. It would make all larger military buildings next to useless. I build a barrier or fortress to conquer a portion of land, then the enemy builds a sentry directly at the border and boom – my civil buildings burn down as some of my land is granted to the enemy even though I still have influence over it. It's neither logical nor fair that such a "strategy" should be possible. And if we changed it like this only for the case of conquering an enemy milsite but not for building a new one (there's currently no difference internally btw), this would make attacking more powerful than peaceful expansion and put undesired emphasis on warfare.


Top Quote
impactus
Avatar
Topic Opener
Joined: 2021-04-12, 20:43
Posts: 16
Ranking
Pry about Widelands
Posted at: 2021-04-25, 22:24

It would make all larger military buildings next to useless

You just shouldnt build important stuff at the frontline, kind of realistic. A fortress would still do what it's supposed to, it would protect a larger radius. I think we should imagine it like, a sentry has "strength" 5 (basically the radius). So next to it, it has strength 4, one field further 3, 2, 1, and then it's out of radius. Now a Fortress would have like 10. That would mean, if the enemy builds a sentry next to the border, on the next field it would have strength 4, the fortress has 1. Goes to the sentry. Next is 3, 2, goes to the sentry. Then 2, 3, kept by the fortress. Next, the enemy could creep forward using one more sentry. It would be built where the fortress has strength 2. One step further, the new sentry would have 4 vs. 3, wins. One step further, it has 3 vs 4, kept by fortress. Now another sentry could not gain more territory, it's first cell would be 4vs4 and we would say ties go to the previous owner.

So, I just wanted to illustrate how a system like that could work, I guess one could tweak that a lot. It's also possible to let more then ties go to the previous owner, resulting in sort of a compromise that should just soften the now hard rules a bit (which is what seems to be perceived as "weird"). One could also add the strength of multiple buildings, or not. The strength could also be decoupled from the actual radius.

I totally get if this more fragile defense is not what people want for the game. I see the fun in how it is as well. Regarding the logic of it, I think is is actually more logical than somehow being allowed to keep land that your enemy has a stronger claim to. Pretty sure Settlers1 had it something like this.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-04-25, 23:17

That's pretty much how we already calculate influences, except that we use a squared and capped range falloff1, instead of linear and unlimited as in your post. The actual change would be that we remove the guarantee that players keep land as long as they have any influence over it at all2 and always give everything to the strongest claimer.

I see your points and it might be logical like that3, but:

  • What is the benefit over the current implementation, except that it seems a bit more logical to some players?
  • These code parts are very very stable and well-tested. Refactoring them in this way is sure to introduce many new bugs. This kind of refactoring requires strong arguments why this is really important and necessary.
  • "Settlers1 had it something like this" is not a convincing argument for me. Widelands is not Settlers face-wink.png

  1. https://github.com/widelands/widelands/blob/master/src/logic/map.cc#L2631-L2643 

  2. https://github.com/widelands/widelands/blob/master/src/logic/editor_game_base.cc#L705-L790 

  3. Though it might actually turn out less logical because players might find it hard to see how strong the influence over a given node actually is, and how it would be modified by various own and enemy buildings. This could become very confusing. The current implementation is perfectly intuitive because only the (clearly visualized) conquer radius counts here. 


Top Quote
impactus
Avatar
Topic Opener
Joined: 2021-04-12, 20:43
Posts: 16
Ranking
Pry about Widelands
Posted at: 2021-04-25, 23:55

What is the benefit over the current implementation, except that it seems a bit more logical to some players?

I think being more logical is not some minor thing, if you meant it that way. From intuitively learning the game to just feeling right and... I almost said being able to predict what will happen, but since I asked for the actual algorithm, I have no problem with that aspect. Regarding more benefits, maybe I'll come up with some, I'll give it some time. I probably don't have enough experience with the game to analyze the tactical pro's and con's. At the moment I'm more about intuitive expectations and how the borders and building placements would look. Why should there be a rather safe farm at the frontline, doesn't really seem natural. Or why would the border not look the same if I lose a building and then regain it. A good argument would probably be if it adds more depth to gameplay decisions, but again, don't know the status quo well enough.

"Settlers1 had it something like this" is not a convincing argument for me.

Sure, I just mentioned it because there one can look at what this system does, without having to prototype it.

Widelands is not Settlers

Actually happy to hear that face-smile.png

Edited: 2021-04-25, 23:56

Top Quote
tothxa
Avatar
Joined: 2021-03-24, 12:44
Posts: 436
OS: antix / Debian
Version: some new PR I'm testing
Ranking
Tribe Member
Posted at: 2021-04-26, 00:32

Could it be implemented in a later release as an option for each game or scenario? Something like "Land ownership rule: old owner preferred (easier to defend) / strongest influence (easier to take)".

I think the advantage of the influence based rule is that the algorithm is simple because it does not have to look for history, as long as ties are allowed to become no man's land.

But I think some existing maps and scenarios depend on the ability to dismantle military buildings after taking some land, and leave it unprotected but still owned, and that's a nice addition. Similar could be achieved for the influence rule by allowing civilian buildings, flags and roads to keep the land they need, but it should be only a second stage consideration, if no enemy has military influence, so this complicates the algorithm quite a bit.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-04-26, 13:52

Could it be implemented in a later release as an option for each game or scenario?

Added it to https://github.com/widelands/widelands/issues/3833 where we have a list of several candidates for such options


Top Quote