@ nafod: My interest pre-dates any submarine computer game. My father was a submarine skipper, and my home was full of submarine history & memorabilia. I've added many other books to the library myself.
Read "Iron Coffins: A Personal Account of the German U-Boat Battles of World War II" or any other U-Boat captains memoirs yourself. Note that Kapt. Werner was a late addition to the U-Boat fleet. Also Doenitz's memoirs. If you want a pictorial account, Buccheims U-Boat War, he was a journalist/propagandist who went on a patrol with a U-Boat. Read the USN's own WWII submarine warfare history.
The WWI tactics were very much relevant to WWII. The majority of the U-Boat kills were made up to June 1943, almost always on the surface in night convoy battles. In March 1943 two convoys were almost completely obliterated by 20+ U-Boats attacking on the surface. You are forgetting that up until then escorts were sparse, and ASDIC & radar technology were not sufficiently developed. And most of the escorts were the Flower class corvettes, which were probably even worse gun platforms than the U-Boats.
During June 1943 the Allies finally gained superiority, with more frigates (DEs in USN parlance) and destroyers joining the convoy escorts, dedicated H-K groups with jeep carriers for air support, better radio direction finding & finally Enigma decoding. Then the U-Boats gave up their deck guns to hide beneath the surface (including obtaining snorkels, and developing both Walter-engines and massive battery packs for the more advanced U-Boats).
Finally: Consider the number of ships sunk by the U-Boats & USN submarines on individual patrols, and their limited number of (dumb) torpedos. That in itself should convince you that deck guns were a major component of the submarine arsenal in WWI & WWII. Acoustic-homing torpedos were not introduced until 1943, and Germany could afford only a limited amount per submarine.
Bookmarks