As Arther Ferrill explains in The Origins of War, the offense-defense inventive cycle is a cycle of warfare ingredients in which mobility, security, and firepower are intertwined in such a way that a change in one requires changes in others (44). I mention this only because I understand the development of siege weapons to counteract the efficiency of castle defense as a perfect example of this cycle. This is very apparent in the evolution of offensive weapons that transpired from a simple siege tower to ballista to the advent of gunpowder artillery--all to achieve the same final result: the fall of a besieged castle.
The forerunner of siege weapons was the belfry, and for the most part it was a tower constructed on wheel that could be rolled forward to cover mining operations and Ramming efforts. However, it gradually evolved to a multi-leveled, multi-purpose siege weapon, whereby planks could be extended from its uppermost story to 'bridge' unto the top of the castle wall, and it also provided cover (by way of animal skins or packed earth) from which crossbowmen and other men-at-arms could help the attack or provide 'covering fire' for the miners and/or ram housed in the lower level.
Usually these towers were pre-constructed and transported with a guard, but it was their actual employment that was the most hazardous--they had to be placed so close to the castle walls that the men working to erect and/or maneuver them into position took constant firing and harassment from the besieged (Bradbury 241-7).
Another siege engine that evolved from as far back as Roman times was the hurling or shooting engine. One example of this is the ballista, or a very large crossbow, that used tension to shoot oversized bolts against besieged personnel--contrary to other sources ballistae...