This is how they seal the Door to Darkness in Ryan's Quest.
They are in the Darkness
Ansem: Behold the endless abyss. Within it lies the heart of all worlds. Kingdom Hearts!
They saw the Door to Darkness
Ansem: Look as hard as you are able. You will never find even the smallest glimmer of light. From those dark depths are all hearts born. Even yours.
And they saw a Giant Heartless
Ansem: Darkness conquer all worlds!
And then fell, and Ryan's Friends has sucked into the Portal and Ryan is falling to his room and then he heard a Voice
Cody: Giving up, already? Come on, Brother. I thought you were stronger then that.
Then he rise up and he us going to fight Ansem and after that They went to the Portal to save their Friends. But they are not and he escape from the Portal, he go to the next and he save the Dazzlings and the Cyberlings. And finally they are fighting a monster head and they went to save Crash, Sci-Ryan, Matau and Spikewave and they did it. So they Destroy the Core and they are going to fight Ansem they defeated him and then everything has been Explode. And Ansem is still alive
Ansem: It is futile. The Keybalde alone... cannot seal the Door to Darkness. Kingdom Hearts! Fill me with the power of Darkness!
The Door of Darkness has opened
Ansem: Supreme Darkness.
Ryan: You think too small, Ansem! I now know. More or less. Kingdom Hearts... IS LIGHT!!!
Then Light has appeared
Ansem: Light... but... why.
He has been defeated and our Heroes are gonna close the door
Ryan: C'mon, friends!
Crash saw something and he look shock
Sci-Ryan: Stop looking through the door and keep pushing, Crash.
They look and they saw the Heartless
All: The Heartless!
Sci-Ryan: Let's get this shut! Quick!
Ryan: I can't... Getting tired..
????: Don't give up!
He saw his Brother
Cody: Come on, Ryan! Together we can do it!
They are trying to close the door and it's no use and then Darkside has appeared
Sci-Ryan: It's hopeless!
Then the Darkside are gone and everyone saw Optimus, Bumblebee and Zig from Zig and Sharko
All: Optimus! Bumblebee! Zig!
Bumblebee: Now, Ryan! Let's close this for good!
Sci-Ryan: Close it! Quick!
Zig (Zig and Sharko): Don't worry, there will always be a door to the light.
Evil Ryan: Ryan, you can trust Optimus for this.
Cody: Now! They're coming!
Optimus: Sci-Ryan, Crash, everyone. Thank you.
They close the Door
Cody: Take care of her.
They finally seal it, Ryan and Optimus has seal the Door the Darkness and now it's gone, Ryan saw Meg, Tino and Sunset, he went off to see them, their friends will gonna miss Ryan now