I would love some ideas on how you guys would perform it if you were coding it.
For rotation and vector related functionality, I would use my library Thor, more concretely its
Vectors module.
You can have vectors from the center of the ship to the cannon positions, let's say
v for the right cannon. Usually, the cannon position is just
p + v, where p is the ship's center position. When you rotate the ship by angle
a (in degrees),
p doesn't change, but
v is rotated. The new cannon position is then
p + thor::rotatedVector(v, a) // rotate v by a°
Stop working with single coordinates X and Y, and trigonometry functions
sin(),
cos() etc. They are too low-level, you need too much code to achieve something simple. Vector algebra is far more powerful -- get used to operating directly on
sf::Vector2f, not its components.