Defensive Structures
This article is a stub. You can help Screeps Wiki by editing to add more information.
Defensive structures include Ramparts and Constructed Walls. Both of these are used to prevent hostile creeps from crossing a certain location. Due to creeps being able to travel diagonally, to prevent a creep from getting through, these structures need to include additional corners than you may expect.
StructureWall
Constructed walls can be built at any RCL, and can grow to 300 million hit points. No creeps can pass through walls, including your own. When built, they have 1 HP and require creeps to repair them.
StructureRampart
Ramparts are similar to walls, but your creeps can pass through them, and if you make them public, others can pass through them too. Ramparts will decay at regular intervals and will require additional repairs.
Usual Placements
At exits
Some players choose to surround each exit with these structures as closely as possible. No structures (except roads) can be built in range 1 of an exit, so a ring around each exit at range 2 is built.
Using min-cut
Whether manually, or automatically using min-cut, this technique is to make a "shrink-wrap" effect, getting all of the walls as close to the rest of your structures, while still providing protection from ranged attacks (range 3).
Using natural terrain
To save energy, many players will build defensive structures at choke points, and other places to minimize the number of walls or ramparts they need to build to higher HPs.