The Pirate Ship — Galleon Combat, Cannons That Inherit Ship Roll
You stand on the deck of a galleon. The ship rolls in the swell. Cannons inherit the roll automatically. Lead the enemy schooner through the wave. Crew shouts orders. Black powder smoke.
What this is
You stand on the deck of a galleon at golden hour. Tapered hull, raised quarterdeck and forecastle, two-tier railings, gunports, mast with main + topsail (vertex-billowed with ragged tatters on bottom), shrouds, crow's nest, an animated Jolly Roger flag with skull. The ship rolls in real Gerstner waves — height sampled at 4 hull points each frame drives ship pitch/roll. WASD walks the deck. E at a cannon snaps you to gunner position. Click fires — iron ball spawns at the muzzle with 60 m/s velocity, gravity applies, you must lead the enemy schooner through the wave swell. Cannons are PARENTED to the ship, so the roll inherits to barrel angle automatically. 8 cannons per side. 8-second reload. Three NPC crew with tricorn hats walk the deck shouting.
Why this is mind-blowing
Black Sails-style ship combat in 1721 lines from one paragraph. The cannon-roll inheritance trick is genuinely clever — by parenting cannons to the rolling ship you get correct ballistics for free. The same scene graph you use for rendering does the physics.
First-person pirate ship combat. You stand on the deck of a galleon —
wooden planks, mast, sails, cannons along both sides, wheel at back.
Real Gerstner waves around the ship — the ship visibly rolls with the
swell. Enemy schooner at 150m firing back. Cannons fire iron balls in
a real arc. The ship's roll affects cannon barrel angle. Crew shouts
orders. Boarding action when ships meet.
Paste this into Claude, Cursor, or Copilot. Change one thing that matters to you.
What I learned shipping it
- Parenting cannons to the ship (so they inherit the ship's roll automatically) is the elegant solution. Don't compute roll separately for each cannon — let the scene graph do it.
- Sampling Gerstner wave heights at 4 hull points each frame and lerping ship pitch/roll from the differences gives you a galleon that ACTUALLY rocks. The math is the gameplay.
- Vertex-billowed sails with a ragged tatter shader on the bottom edge sell pirate-ship aesthetic in 30 lines of GLSL.