Which game is it the only ones I know where the story would be confusing would be re:coded.
Brith by Sleep.
Follows 3 keyblade wielders has they battle Xenohort they succeed in stopping him from aquring KH but all 3 wind up in there private version of hell. There powers all pass on to children they each met in there journeys. These kids grow up to be the heroes in the other KH series.
Kingdom Hearts.
Kairi, Sora, and Riku are 3 kids who dream of other worlds, they even build a raft to try to escape theirs. However one day the darkness attacks there island. Riku is swallowed, Kairi disappears, and Sora wakes up on unknown world with a mysterious key in his hand. Journying with him is Donald and Goofy. Along the way they try to rescue Kairi and battle Riku who has decided to join with Maleficent forces to find and rescue Kairi. Riku is eventually possessed by Ansem who controls him on his search to enter Kingdom Hearts. In the end Sora finds Kairi, manages to defeat Ansem, but he is force to seal Riku and King Mickey behind the doors of Kingdom Hearts.
COM
To keep his promise to Kairi to return Riku to the island Sora sets out to find another door. There he finds a castle where people in the black hoods promise him he will find someone important to him in the castle. Has Sora climbs the castle he starts to loose his memories but he gains memories of Namine. On the top floors though he finds Namine and Namine reveals his new memories he has gained of her are lies and that an organzation is trying to gain control of him through his memories. Sora destorys the organzation members (except Axel who gets away) and decdies to go to sleep to regain his memories. Menawhile Riku enters the basement of the castle and confronts Ansem who tries to possess him again. To escape the darkness Riku climbs the caslte battling memories of the darkness. Eventually though Namine gives him the secret to winning the darkness he has been possessed with belongs to him and if he learns to use it Ansem will never possess him again. Riku learns of the new power and chooses to fight Ansem, he fights and wins but realizes Ansem is still inside him and decides not to stay with Sora he and Mickey depart on another journey.
KH 358/2 days.
When someone becomes a heartless a nobody is left behind. If the person is strong will that nobody will look and even act like the orginal. But it has no heart and no feelings. A group called Organziation 13 has set up to find themselfs hearts, even if it means destorying any world they come accross. There new member is Roxas (which is Sora nobody because Sora became a heartless temporily in the orginal to save Kairi). Roxas spends a year with the orginazation and becomes good friends with Roxas and another keyblade wielder named Xion. However Xion is a puppet deidcated to suck Roxas dry and become a copy of Sora. When she learns that she leaves the group and Roxas decides to try to track her down. Even after finding her he finds out that the friendship the trio had is over and confused about what is happening he leaves the organzation.
KH2.
After being rejoined with Roxas Sora awakes and battles the organization and tries to find Riku. After jorney through many worlds and finding out that the Ansem that has possessed Riku is not the real Ansem but a man named Xenohort and his nobody controls the orginazation Sora finds the orgianzations homeworld thanks to Axel sacrificing himself. Sora battles and defeats Xemnas and he and Riku return to there island after a short stint in the dark realms.
RE:Coded.
Back home Mickey is enjoying a relaxing vacation but Jimminey notices a strange message in one of the journals. They decide to create a virtual world in the journal and use a virtual Sora to clean the journal up. After cleaning the journal up and exploring Castle Oblvion the virtual Sora encounters a virtual Namine who tells him that the real Sora has memories from one of the keyblade wilders from BBS (and it's why Roxas looks like him) and that if those memories awake it will destory him. Mickey sends a message to Sora about it and it's where DDD starts.