There is nothing more compelling than a well-written friendship in a video game. Some games will feature lovable characters who share a strong bond to pull on the player's heartstrings, but some games take these connections and morph them into something sinister.

Friendships can fail depending on the actions and intentions of the two who share one. Certain characters will have a change of heart due to their own ideologies, the influence of others, or poor programming. The sudden shift in allegiances will usually come as a shock, but only if their friendship was convincing.

6 2B & 9S – NieR: Automata

nier automata secret room

2B is somewhat distant during the opening of NieR: Automata, but progressing the story reveals that she holds strong feelings for 9S beneath her harsh exterior. Though their relationship is presented to be purely platonic, it is difficult to ignore the subtle romantic feelings that echo through their interactions.

RELATED: Bad Decisions In NieR: Automata That Can Cost You The Best Ending

2B and 9S become extremely close throughout the game, but sadly, their bond is not to last. It is revealed during the final moments of the game that 2B was created to monitor 9S and eliminate him if he came too close to the truth about YoRHa's mission. She has been forced to execute him countless times before, but 9S has no memory of these assassinations. Their adventures together are always doomed to end in heartbreak due to 2B's programming. They are enemies, not because they want to be, but because of how they were manufactured.

5 Gregory & Glamrock Freddy – FNAF Security Breach

FNAF Security Breach
FNAF Security Breach

To uncover the whereabouts of some missing children, Gregory devises a plan to sneak inside Freddy Fazbear's Mega Pizzaplex and scavenge the facility for clues. While wandering its haunting corridors and amusements, he happens upon a Glamrock Freddy animatronic, and the two quickly form a strong bond.

Unlike his robotic counterparts, Freddy has no intention of harming Gregory — that is, until he runs out of power. It is up to the player to ensure his power levels remain full, or Freddy will lose control and attack. Gregory and Freddy's relationship is nothing short of adorable, but only if the player takes care with how they approach this unpredictable machine. Though they remain friends throughout the story, their relationship will quickly turn sour if not handled carefully.

4 Chell & Wheatley – Portal 2

Wheatley from Portal 2

Chell and Wheatley spend the first half of Portal 2 working together in an attempt to escape the Aperture Science center. After accidentally reawakening GLaDOS, the Aperture Science center's central core, the pair's plan of escape is rendered much more difficult. To ensure her deactivation, Chell swaps GLaDOS's core for Wheatley's, resulting in her once loyal companion becoming corrupted.

Wheatley denounces his ties with Chell and, due to the uncontrollable power coursing through his system, causes Aperture Science to begin deteriorating. To escape, Chell is forced to either destroy her once faithful friend or accept her doomed fate. It is a difficult choice to make, especially due to the endearing relationship the two have formed, but completing the game requires it to be made.

3 CJ & Big Smoke – Grand Theft Auto: San Andreas

cj and big smoke in san andreas

CJ stumbles upon his childhood friend, Big Smoke, after returning to San Andreas for his mother's funeral. The two reminisce about old times in CJ's kitchen before embarking on a series of new adventures to reinstate Grove Street's power across Los Santos. It is made abundantly clear that the two share a strong connection, making Big Smoke's betrayal even more shocking.

Smoke reveals to CJ during the game's climax that he chose to betray his friends in the hope of achieving fame and riches. He then goes on to state that he is driven by greed, so he had no choice in the matter. CJ stays by Smoke's side as he passes away as a sign of respect, but given the events that unfolded due to his unforgivable actions, it may take years before he can be truly forgiven.

2 Cecil & Kain – Final Fantasy 4

final fantasy 4 character artwork with official logo cecil

After questioning the king's reason for the attack on Mysidia, Cecil is stripped of his titles and tasked with delivering a magical ring to the Village of Mist. Cecil sets off on his quest to deliver this mysterious piece of jewelry with the help of his long-time friend, Kain, a dragoon who shares the same opinion on the attacks as Cecil.

RELATED: Best Board Games That Will Make Friendships Go Up In Flames

After arriving in the Village of Mist, the ring unleashes an array of powerful monsters that quickly destroy the town and all its inhabitants. The world splits beneath Kain and Cecil's feet, and the two become separated for a decent chunk of the story. The next time they meet, Kain reveals himself to be working for Golbez, the main antagonist of Final Fantasy 4. Though it takes time for Cecil to come to terms with Kain's betrayal, he eventually decides to stand up against him for the sake of humanity.

1 Sora & Riku – Kingdom Hearts

Kingdom Hearts 3 Sora and Riku

The opening of Kingdom Hearts introduces the player to three childhood friends gathering supplies for their newly constructed raft. It is made evident during their two days on Destiny Island that these young children share a strong bond, but Riku's desire to see what lies beyond his tiny world serves to be the friendship's undoing.

After their home is plunged into darkness, Sora and Riku are cast off into different regions of the galaxy. When they eventually cross paths again, Riku grows jealous of Sora's newfound comrades and decides to venture down a more sinister path to accomplish his goals. His envious ways lead him to confront Sora in Hollow Bastion where he steals his keyblade and manipulates Donald and Goofy into joining him. Though he eventually denounces the darkness, it is difficult to forget the time he spent as Sora's enemy.

MORE: Games That Use The Power Of Friendship To Save The Day