#21 closed enhancement (fixed)
[PATCH] Building construction
Reported by: | Stuart Walpole | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | |
Component: | Core engine | Keywords: | patch |
Cc: | thomas.fussell@… | Patch: |
Description (last modified by )
Attachments (2)
Change History (25)
comment:1 by , 14 years ago
Milestone: | Advanced Playability Demo |
---|
comment:2 by , 14 years ago
Milestone: | → Backlog |
---|
comment:3 by , 12 years ago
Description: | modified (diff) |
---|---|
Summary: | Entity Event - Construction → Building construction |
Type: | task → enhancement |
comment:4 by , 12 years ago
Cc: | added |
---|---|
Keywords: | review added |
Milestone: | Backlog → Alpha 12 |
Summary: | Building construction → [PATCH]Building construction |
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 by , 12 years ago
Keywords: | patch added |
---|---|
Summary: | [PATCH]Building construction → [PATCH] Building construction |
by , 12 years ago
Attachment: | 21.2.patch added |
---|
follow-up: 7 comment:6 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
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 by , 11 years ago
Milestone: | Alpha 12 → 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 by , 11 years ago
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 by , 11 years ago
Here's a link to the forum thread: http://www.wildfiregames.com/forum/index.php?showtopic=16762
comment:14 by , 11 years ago
Description: | modified (diff) |
---|
comment:16 by , 11 years ago
Description: | modified (diff) |
---|
comment:17 by , 11 years ago
Description: | modified (diff) |
---|
comment:18 by , 11 years ago
Description: | modified (diff) |
---|
comment:19 by , 11 years ago
Keywords: | design added; review removed |
---|
comment:20 by , 11 years ago
Owner: | set to |
---|
Philip is now working on a prototype of terrain flattening that is visual only, so it won't affect pathfinding: http://youtu.be/8iLXEhVRj94
Apparently it will be controlled by an entity flag, with a setting in Atlas to control whether a placed building uses flattening or not (more flexibility for the map designer).
comment:21 by , 10 years ago
Owner: | removed |
---|
There is http://git.wildfiregames.com/gitweb/?p=0ad.git;a=shortlog;h=refs/heads/projects/philip/terrain-flattening now, but it doesn't seem to be in active development, so I'm removing Philip as owner.
comment:22 by , 10 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixing it as #2264 covers the last part.
comment:23 by , 10 years ago
Keywords: | design removed |
---|---|
Milestone: | Backlog |
Milestone Advanced Playability Demo deleted