By the 14th century, the golden age of castle building was coming to an end. With the advent of gunpowder, castles were no longer the impregnable fortresses they had once been. The pounding of cannon fire could breach the walls and leave the castle vulnerable and open to attack.