Sometimes, for creative reasons such as putting a new spin on a particular character or narrative, a game's creators may take an established character from external media or a historical figure and swap their gender. The result may also be accompanied by changes in the character's personality and/or the way that other characters approach him/her.
In Capcom's Sengoku Basara series, Magoichi Saiga, a male figure from the Warring States era of Japan and leader of a militia, is depicted as a gun-toting woman of strong will. This contrasts with Magoichi's depiction with his actual gender in Koei's Samurai Warriors series, in which he fancies himself a womanizing ladies man.
The gender of the character Xuanzang (a.k.a. Triptaka) from the Chinese novel Journey to the West is not actually specified in the original text. Thus, the character has been depicted as both male and female, depending on the game. The character is recast as Trip in Ninja Theory's Enslaved: Odyssey to the West, while in Koei's Warriors Orochi series (in which the name is romanized Sanzang), she is a somewhat naive but good-hearted girl.
The central figure of Arthurian legend, King Arthur, was recast as a girl named Alu for the visual novel Princess Arthur. After she becomes queen, the Knights of the Round Table become her suitors, as well as her allies.