building near shoreline

Bug #861840 reported by Shevonar on 2011-09-28
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Low
Unassigned

Bug Description

Some big buildings near the shoreline are partly build on water. Astuur discovered this (http://wl.widelands.org/forum/post/6068/), but I could not find a bug report yet. I think the easiest solution is to disallow big buildings that near to the coast. Could maybe get solved together with bug 566970

Related branches

Venatrix (elisabeth) wrote :

As Chuck stated in http://wl.widelands.org/forum/post/6087/ big buildings have to be allowed near the coast line, unless harbours and big buildings will be divided into two different kinds of buildings. But as I understood it, the plan was to make harbours special big buildings.

Shevonar (shevonar) wrote :

In my imagination they are still NEAR the water but not ON the water. Nevertheless it might be problematic with harbours which should partly stand in the water maybe. However, I think this problem should be discussed before seafaring is finalized.

Nasenbaer (nasenbaer) wrote :

I agree with Shevonar, that the buildings still are NEAR the water, not ON. concerning the question, whether a harbour should stand inside the water: Settlers 2 harbours did not stand inside the water, still their appearens made clear what they are, so it is no "must" to have a quay on the building, that reaches into the water. Anyways, if we want to have such things as quays it would probably be a good idea to have different types of harbour build spaces (one for each quay direction), but this is from my point of view:

1) over powered
2) off topic on this place ;)

Nasenbaer (nasenbaer) wrote :

just to clearify 1) as it sounds a bit unfitting - I wanted to say somethings along the lines of "not worse the trouble to handle 6 types of harbour build spaces as well as 6 different types of harbours for each tribe"

so to come back to the question: perhaps it is a good idea to really disallow big buildings near shore lines - which most likely will fix bug566970 as well - in that case we indeed have to special case the harbour build spaces, but that should not be a problem, as the code is even less than unfinished ;)

Shevonar (shevonar) on 2012-10-04
Changed in widelands:
status: New → Confirmed
importance: Undecided → Medium
importance: Medium → Low
Nicolai Hähnle (nha) wrote :

The linked branch lp:~nha/widelands/buildcaps-ext provides a first stab at solving this issue. Basically, this re-imagined way to compute buildcaps requires each of the four fields occupied by big buildings to be (a) completely on regular buildable terrain and (b) not adjacent to bigger immovables on the map.

The branch does not handle ports yet. There are two possible ways to go forward for ports:
(1) Have port spaces be a subset of fields where big buildings are built, just that ports may then be slightly further away from the coastline than they were previously, or
(2) Introduce special treatment for port spaces that allows the l/tl/tr fields of ports to be on the coast line.
Right now, I'm leaning towards (1).

Nicolai Hähnle (nha) wrote :
Nicolai Hähnle (nha) wrote :

I have updated the branch to implement the proposed changes to the placement of ports, see the attached picture.

This may seem foreign initially, because of how different it is from Settlers 2 in particular, but it follows the strict logic that a port equals a big building near water.

SirVer (sirver) wrote :

seems like you made quite some progress here. I first comment on #6 and #7. The improvements seem good to me, the only thing that I find strange is that one field (top left to the cursor in shot0004) became a big building but was a medium before. How come?

About the harbors: I strongly urge to stick with what we have in this regard, that is harbor buildings should be special and placed by the map maker. We had this dicussion a while ago (I remember Peter being involved) and tested a bit around and found that is is really hard to make a constraint map - that is one map where you only should be able to build a harbor in places where the map maker intended to - if you do not make harbor buildings specially placed in the editor. Ports are so important from a strategic point of view that they deserve special treatment.

Nicolai Hähnle (nha) wrote :

That particular medium building became big because there isn't really a strong reason for it to be medium. All fields occupied by the big building are free, and their neighbours don't have big immovables next to them.

On the other hand, that does suggest a slight tweak to the algorithm, which is to treat non-player immovables as slightly bigger than player immovables. That would result in the buildcaps near granite immovables to behave a bit more like they used to. I will try and see how that looks.

About the harbours, there may have been some confusion by what I wrote: I still intend for them to be placed by the mapmaker. It's just that there are constraints on where the mapmaker can place a designated "port space" (as they are called in the code), and those constraints have changed slightly in the branch. So what the screen shot actually shows is all the places where a mapmaker can put a port space. So, to create that screenshot, I manually placed port spaces everywhere possible, simply to illustrate that in conjunction to the rest of the build possibilities.

Nicolai Hähnle (nha) wrote :

This screen shot shows a slightly modified logic, in which the main field of a building is slightly more averse to nature immovables. The result is that the big building you mentioned becomes a medium building again, and it is no longer possible to build small buildings directly next to granite. I think this last change fits the graphics better.

Still, overall there are a number of places where slightly larger buildings can be placed than previously; the biggest change is certainly to the north-west of granite fields. On the other hand, there are many places where only smaller buildings can be built now, especially next to coastlines.

SirVer (sirver) wrote :

A, a misunderstanding indeed.

I find the different approaches hard to judge without actually playing them. How about you merge your favorite way and then we'll gather feedback in the coming months?

Nicolai Hähnle (nha) wrote :

I've just done the merge. Note that I have not changed any maps yet; there are some maps, especially Ancient Sun of Fire, that definitely need changes to work well with the new logic, and other maps might benefit from some subtle tweaks.

Changed in widelands:
status: Confirmed → Fix Committed
milestone: none → build18-rc1
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers