SAN FRANCISCO (AFP) - The sex scandal that forced the resignation of CIA chief David Petraeus has not stopped him from achieving greatness in the make-believe world of action videogames.

An animated version of the fallen US spymaster has a part in what is expected to be the top selling video game of the year - freshly-launched military espionage action title Call of Duty: Black Ops 2. Mr Petraeus is promoted to US Secretary of Defence in the game, set in a fictional near-future, serving under a woman president who resembles Hillary Clinton.

The game, and the role of Mr Petraeus, was created well before the sex scandal erupted last week around the former four-star US general who headed forces in Afghanistan and Iraq.

The real-world Mr Petraeus resigned last week when it became clear that his affair with married 40-year-old military reservist Paula Broadwell, a military academic who wrote a fawning biography of the general, would become public.