Opened 12 years ago

Closed 7 years ago

Last modified 7 years ago

#1566 closed defect (duplicate)

On wall expandibility

Reported by: fabio Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by fabio)

Two issue found while playing on Fortress RMS:

  • it's not possible to expand walls from the existing tower walls, I can start the wall building mode but I get the red wall and the message "you can't build wall here". However there are no terrain obstruction, indeed I can build wall not connected to existing towers at the same place;
  • it should be possible to extend walls also if terminating wall towers are not available. In this case I simply can't start the wall building mode. I suppose this should also the vase when a tower is destroyed and I want to replace it;
  • also it may be useful to be able to build a single wall tower, for example to complete the wall on Fortress RMS (missing wall towers), to replace an existing destroyed tower or also to build a single wall tower without walls around (it was discussed on the forum that wall towers will have not default arrow so it can be used as a cheaper alternative to the standard tower).

Change History (12)

comment:1 by fabio, 12 years ago

Milestone: BacklogAlpha 11

comment:2 by Kieran P, 12 years ago

Milestone: Alpha 11Backlog

comment:3 by Deiz, 12 years ago

In 12258:

Added engine-side obstruction group sanitizing, saving, and loading. Refs #1566

comment:4 by Deiz, 12 years ago

Owner: set to Deiz
Status: newassigned

The former issue should be solved for all cases, including both RMS maps and all scenarios that include walls (mostly for Iberian players).

I'll look at the latter issue later. It might be easy enough to fix for alpha 11, but I'll keep the milestone where it is until I've taken a proper look at the relevant code.

comment:5 by fabio, 12 years ago

Description: modified (diff)

comment:6 by Deiz, 12 years ago

Milestone: BacklogAlpha 12

I'm not going to implement this for alpha 11 but having looked at how snapping is handled I'm confident it can be done for alpha 12.

Once your second point is resolved, the third point will resolve itself automatically: walls only need two pieces right now if you're building a brand-new wall. If you snap to an existing entity, it counts as the first piece.

Mostly for future reference:

Snapping to towers is easy because a) towers set the control groups for walls, b) walls snap to the mid-point of towers, c) a limitless number of walls may connect to a tower (space permitting). Walls are more difficult because they only support two towers (one on each end). Due to how control groups don't necessarily map to existent entities, it's impossible to determine precisely how many towers connect to a wall without doing collision tests. Likewise, determining which end (if any) is able to have a tower snapped onto it requires collision testing.

The other substantial hurdle occurs when actually placing a tower onto a wall: resetting the wall's control groups. Towers have control group dominance, they retain their own groups and walls are made to inherit them. Assuming the wall has two control groups already, it would be necessary to get all entities that collide with it, iterate through them checking their control groups, and finally removing control groups from the wall if it isn't colliding with anything that uses them.

comment:7 by O.Davoodi, 12 years ago

Nearly all games handle the second point by destroying the attached walls when a tower is destroyed.

in reply to:  7 comment:8 by fabio, 12 years ago

Replying to Spahbod:

Nearly all games handle the second point by destroying the attached walls when a tower is destroyed.

It doesn't seem very fair that destroying a tower destroy also the walls. Maybe if this is wanted tower healt should be the healt of the lonely tower itself + a percentage (70% ?) of the current healt of the attached walls. But maybe it become a little too complex...

comment:9 by Kieran P, 11 years ago

Milestone: Alpha 12Backlog

comment:10 by historic_bruno, 11 years ago

Owner: Deiz removed
Status: assignednew

comment:11 by scythetwirler, 7 years ago

Resolution: duplicate
Status: newclosed

Split into #3789 and #4306.

comment:12 by Stan, 7 years ago

Milestone: Backlog
Note: See TracTickets for help on using tickets.