Ticket #21 (new enhancement)
[PATCH] Building construction
| Reported by: | stuart | Owned by: | |
|---|---|---|---|
| Priority: | Should Have | Milestone: | Backlog |
| Component: | Core engine | Keywords: | patch review |
| Cc: | thomas.fussell@… |
Attachments
Change History
comment:3 Changed 12 months ago by historic_bruno
- Type changed from task to enhancement
- Description modified (diff)
- Summary changed from Entity Event - Construction to Building construction
comment:4 Changed 8 months ago by thomas
- Cc thomas.fussell@… added
- Keywords review added
- Summary changed from Building construction to [PATCH]Building construction
- Milestone changed from Backlog to Alpha 12
This is my first patch and I thought it would be a useful issue to start on.
To summarise the changes:
-Added a section to Foundation.js component to flatten the surrounding area when construction is started.
-Added method to complement ICmpTerrain::GetGroundLevel?(), ICmpTerrain::SetGroundLevelRegion?(). This method sets all height values to the same value for a given (possibly rotated) rectangular region.
-Added setter to CTerrain to set value of heightmap at a specific point.
The main issue now is smoothing into surrounding tiles and updating the footprint decal once the height changes. I'll be working on that.
comment:5 Changed 8 months ago by k776
- Keywords patch added
- Summary changed from [PATCH]Building construction to [PATCH] Building construction
comment:6 follow-up: ↓ 7 Changed 8 months ago by historic_bruno
Are there any constraints on this, like the maximum height difference that is allowed? That might be more of a building restriction concern, but it's worth thinking about now if we're going to have terrain flattening.
One problem I anticipate is that building on a hill might create permanent impassable terrain tiles (due to slope) or dramatically alter the surrounding terrain. This would also potentially affect territories since they are terrain dependent. A related issue: the player might use this to their advantage by repeatedly placing foundations and deleting them before they finish. So I think we need to be very careful with how this is implemented.
comment:7 in reply to: ↑ 6 Changed 8 months ago by Geek377
See ticket #1634
Replying to historic_bruno:
Are there any constraints on this, like the maximum height difference that is allowed? That might be more of a building restriction concern, but it's worth thinking about now if we're going to have terrain flattening.
One problem I anticipate is that building on a hill might create permanent impassable terrain tiles (due to slope) or dramatically alter the surrounding terrain. This would also potentially affect territories since they are terrain dependent. A related issue: the player might use this to their advantage by repeatedly placing foundations and deleting them before they finish. So I think we need to be very careful with how this is implemented.
comment:8 Changed 7 months ago by thomas
Those are some good points. I don't know what the correct answer is. We can look at other games for some suggestions. In Empire Earth, the elevation can't change that much so it isn't an issue. In reality, if someone is building a building on an incline, he can either excavate or build a basement foundation (like that which is done for walls in 0 A.D.). We could try building a "foundation" or prevent a player from building a building if the height difference is too great.
comment:9 Changed 7 months ago by historic_bruno
Yeah I think if the terrain flattening is purely a cosmetic concern, often it could be addressed by altering the models themselves, which removes any gameplay concerns. There may be a few structures where this wouldn't work or would look bad, like some of the civil centers. For the remaining cases we could place some tight constraints on the terrain flattening (e.g. at most 1-2m difference between min and max height) and perhaps even add to the construction costs to make it less exploitable.
comment:10 Changed 7 months ago by FeXoR
I'm not sure if the approach of terrain flattening is solving more issues than it creates especially since it "only" solves a visual issue and generates a gameplay issue. That's a bad trade IMO.
Sorry, thomas, but I feel I need to say this.
I think, and AFAIK is was pointed out by others before, all buildings should reach far into the ground to avoid flying buildings.
It's a bit of a shame that for the nice Hellenic Civil Centre that will not be enough but filling the gaps in the ground with lower parts of another color should fix it, too, and if the terrain is about flat they will not be seen so in that case it would look like it is now.
comment:11 Changed 6 months ago by k776
- Milestone changed from Alpha 12 to Backlog
Backlogged until a decision is reached. Best thing to do is open a thread in the "Development & Technical Discussion" forum and see what others think (reference this ticket, post screenshots of before and after your patch, list the benefits and the negatives, etc). Once we have a clear decision, we can move ahead with this one way or another.
comment:12 Changed 6 months ago by FeXoR
I think feneur would be best suited to do this ;)
But if nothing happens for a while concerning this I will do it.
comment:13 Changed 6 months ago by thomas
Here's a link to the forum thread: http://www.wildfiregames.com/forum/index.php?showtopic=16762
comment:15 Changed 4 months ago by ben
In 13143:

Milestone Advanced Playability Demo deleted