In the 15th century CE, the carrack was developed by the Genoese, Portugese and Spanish out of the Medieval cog.
They combined the stern rudder and square-rigging of the cog with the caravel-built hull and lateen-rigging of Mediterranean galleys.
The result was a sturdy ship with three or four masts and large carrying capacity that was steadily increased over time.
Big ships like carracks were ideal for serving as gun platforms, though the transition from boarding tactics to naval gunnery was slow.
Most of the early ship guns were light swivel-guns, anti-personnel weapons that sprayed shrapnel across the decks of enemy ships just before boarding.
They were placed in the forecastles and/or hindcastles, from where they could be turned in any direction.
Around 1480 CE stronger but lighter and more accurate bronze cannons became available.
These heavier guns were strong enough to damage ships.
The Portugese started to mount them on their own caravels and carracks.
The weight of the heavier guns destabilized the ships, so they were placed at the sides, just above the waterline.
This allowed 'broadside' volleys that would become standard practice for several centuries.
Gunports could be closed, so that they did not become leaks when a ship had to struggle through a storm.
In the 16th century CE cannons got larger, heavier and more powerful.
The ships also grew in size, from several hundred tons to several thousand.
Gradually, artillery fire became the standard way of fighting naval battles; boarding became less and less common.
War Matrix - Carrack
Late Middle Age 1300 CE - 1480 CE, Weapons and technology