Labyrinth

The labyrinth or glitched Coliseum is an area within Olympus Coliseum's Keyhole that appears in Kingdom Hearts coded. It initially contains five floors known as "layers" however completing these unlocks fifteen layers that can be completed to unlock a further thirty layers. In the labyrinth, gameplay transforms into a turn-based battle system.

Kingdom Hearts coded
After discovering that Olympus Coliseum is infested with bugs and Hercules hasn't returned from destroying them, Data-Sora promptly finds and enters the world's Keyhole to reach the labyrinth. After finding several "shreds of wisdom", Data-Sora finds Hercules and the two team up. Later, they battle Cloud, who was tricked into attacking Hercules by Hades. After losing the battle, Data-Sora and Hercules forgive Cloud for his mistake and offer to join forces but to no avail. In a state of shame and humility, Cloud denies and decides to go his own way. Deeper into the labyrinth, Data-Sora and Hercules find Cloud struggling against a horde of Heartless and insist on helping despite Cloud's protests and reluctance. Eventually, the Heartless are overcome and the three agree to journey together.

If the player avoids Cloud, Data-Sora and Hercules can continue on without helping and joining him.

The three soon defeat Cerberus, one of Hades's henchman. and the supposed source of the world's bugs. Enraged, Hades fights the party himself, only to come out as the loser. Data-Sora then realises that Cerberus wasn't causing the bugs, meaning the party had to venture even deeper into the labyrinth. During their travels, the party destroy the Behemoth and Rock Titan, which were also wrongly believed to be causing the world's bugs. Once they get to the end, the trio encounter the Ice Titan and defeat it to discover that it was the source of the world's bugs. Finally successful, Data-Sora and Hercules report to Philoctetes while Cloud leaves to go his own separate way.

If the player is only doing five layers, Cerberus is found to still be the source of the world's bugs and the party return to Phil after battling Hades. If the player is doing fifteen layers, the Rock Titan is the bug source and the party return after defeating it.

Kingdom Hearts Re:coded
While in the field, Data-Sora retains all movement abilities but has no combat capabilities, except striking with the Keyblade. A typical layer contains several rooms with corridors connecting them. Each room is affected by the Bug Level, which indicates the amount of Bug Blox in the room and determines the strength of that room's enemies. Destroying Bug Blox and defeating Heartless reduces the Bug Level, which weakens enemies, earns bonus score points and converts Metal and Danger Blox into Normal and Prize Blox. To advance to the next layer, Data-Sora must find and examine the warp point, usually hidden beneath a pile of Bug Blox. At the end of each layer, a score is given based on the amount of score prizes obtained. Save rooms are found between certain layers.

To initiate a battle, Data-Sora must come into contact or strike an enemy with the Keyblade. If Data-Sora attacks an enemy from the back, he will trigger a pre-emptive attack, giving him an extra turn at the start of the battle. However, if an enemy attacks Data-Sora from the back, Data-Sora will be caught in a back attack, giving the enemy an extra turn at the start of the battle. Swirling shadows, known as menaces, contain powerful enemies that pursue Data-Sora even if he is in another room or corridor.

In combat, most abilities and the Loot Cheat are disabled since battles are entirely turn-based. Data-Sora can perform a regular attack by pressing and can string combos up to three hits by pressing  when prompted. When an enemy attacks, blocking can be achieved by pressing when prompted, halving the damage taken. Holding down the R button, allows the party to attempt to escape the battle. Team combat with party members, such as Hercules or Cloud, is similar to individual combat, though Game Over is only achieved when Data-Sora's health is fully depleted. Some techniques are exclusive to Data-Sora, including compiled commands and licenses. However, all characters can perform a unique, individual special attack, which randomly replaces a standard combo attack: