Opened 8 years ago

Last modified 7 years ago

#3685 new enhancement

Improvements to obstructions — at Version 1

Reported by: Stan Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords: patch
Cc: wraitii Patch:

Description (last modified by sanderd17)

There are several improvements that could be made wrt obstructions:

  1. Allow circular static obstructions:

Some buildings are circular, and it's weird that the ability to place them sometimes depends on the angle. If you check the stonehenge wonder f.e., the invisible corners are very big.

All wall towers should also have circular obstructions as the player can't determine the rotation of the first tower (but the rotation of the first tower is determined by the angle of the wall). So when starting a wall-piece in the direction you want, it can either obstruct the tower, or create a gap because the obstruction gets rotated.

Since the obstructions are always rasterized, it shouldn't be very calculation intensive to support circular static obstructions (just adding a check in the rasterization loop).

  1. It should be possible to overlay different obstruction types on one template

Most buildings aren't made to serve as a wall. So passages should be guaranteed between them. This would be possible by overlaying two different obstructions:

  • An obstruction that blocks pathfinding, so units don't walk through the building
  • A bigger obstruction that blocks construction, so buildings can't be placed close enough, and units can always pass.

The gap between two buildings should be wide enough so units can actually cross in that gap.

Walls on the other hand are in a different situation, and should probably block more pathfinding than they block construction, so they can create a certain obstruction overlap, and block all units with certainty. This may be a bit more difficult to achieve.

Note that these double obstructions seem already possible, since it's done with the gate (a gate has 3 obstructions, of which the center one can be made passable but not be constructed on). So I guess it mainly misses a way to put this into the schema.


Together, this should fix most issues with wall-placement, make building placement more relaxing, but also help fixing issues like #3517 (due to the guaranteed gap).

Change History (3)

by elexis, 8 years ago

Attachment: commands.txt added

Reported commands.txt for a19.

comment:1 by sanderd17, 8 years ago

Description: modified (diff)
Summary: Can't build straight walls over obstructionImprovements to obstructions
Type: defectenhancement

I made this ticket a bit broader, as multiple improvements can be made.

by sanderd17, 8 years ago

Attachment: roundObstructions.diff added

Partial implementation of round obstructions. It works nicely for placing buildings, and works good with the long-range pathfinder, but supporting the vertex pathfinder is hard.

Note: See TracTickets for help on using tickets.