The Castle (known in-game in pre-MSX versions as The Castle and Princess) is a fantasy puzzle-adventure platformer developed by Isao Yoshida (as Cherry Soft) and published by ASCII for Sharp X1 and FM-7 computers in Japan on April 1985.
In The Castle, players traverse the titular castle as Prince Rafael in order to rescue the imprisoned Princess Magarita. Along the way, he must navigate around a series of dangerous puzzles in order to progress through each of the 100 rooms, all of which are connected in a 10×10 grid with different-colored doors (each consuming a key of the same color).
The game is known as a predecessor of the "Metroidvania" sub-genre of platformers, as the game focuses on exploration of a large 2D open world where backtracking is often necessary. In addition, it features a limited-use game saving mechanic (which consumes one of the prince's lives) and some versions allow the player to hasten up the game speed at-will.
Ports of the game by Keisuke Iwakura were later released for NEC PC-9801 and NEC PC-8801 computers on July 1985, for MSX computers on April 1986, and for NEC PC-6001 mkII computers in 1987. It was also ported by Sega for their SG-1000 console on September 1986.
The game received a sequel in late 1985, titled Castle Excellent. Although the core gameplay remains the same, it includes a new set of 100 rooms more challenging than the original. Its NES version received an overseas release (as Castlequest).