Enter Choice of Games who make this very type of game and allow you to play them on their website. My favourite of their games is Choice of Broadsides in which you begin as a midshipman in the Royal Navy of Albion locked in a death grapple with Republican Gaul. Essentially this is the French Revolutionary/Napoleonic war and you get to be Hornblower, or Aubrey or Bolitho. At the start you make some choices about your background - will you have plenty of influence to smooth your career, be a brilliant sailor or a highly skilled swordsman who closes at every opportunity. If you're smart and play to your strengths you may rise swiftly through the ranks, but if, for example, you're rubbish at gunnery and keep trying to engage the enemy from long range you'll undoubtedly lose. The game is fairly forgiving, at least up until the climactic battle, but victories lead to early promotion and probably make you more attractive to the opposite sex whilst on shore.
I say you start as a midshipman but the game is designed to be as inclusive as possible, so an early question says:
This game is set in a fictional world, similar to our own but with some differences.
For example, perhaps the ships are crewed by women. You are a young and gallant officer, but are you a young gentleman or a young lady?
and if you're a midshipwoman it replies:
The place for a man is domestic, rearing the children and making a pleasant home for his wife. We put men up on a pedestal so that they do not need to face the hardships that women are more constitutionally suited to bear.
This begins as hilariously straightfaced, but as you go on the gender-swapped regency world highlights some of the strangeness.
All in all I enjoyed this. It has some replay value - I did pretty well as a highly skilled officer with little influence or charm, then turned around and made a big hash of things as the son of a peer with immense charm who always got away with things. I only wish we had an opposite rival, so the poor but brilliant officer would be one step behind the influential guy, and a player with connections would be annoyed that some unworthy oik who happened to be a good sailor kept hogging the glory. There are a couple of good characters, although the common sailors are generally undistinguished.
Play This: If you want to have an amusing hour or two being a literary naval officer and like the whole gamebook thing.
Don't Play This: If the Napoleonic wars aren't your thing, or think that choose your own adventure is stupid.
Also: Choice of Games has three (or four) other games: Choice of Dragon, Choice of Vampire, and Choice of Romance and it's sequel Choice of Intrigue.