
Avalon Code is a role-playing game developed by Matrix Software and released in 2008 for the Nintendo DS. The story follows a young peasant tormented by prophetic nightmares, who learns through a mysterious vision that their world exists within an endless cycle of destruction and rebirth. A divine force has chosen the protagonist to judge which people, places, and objects deserve to carry forward into the next world after an impending cataclysm. Central to both the narrative and the gameplay is the Book of Prophecy, displayed on the DS's lower touch screen. Players use a mechanic called a "Code Scan" to catalogue encountered entities — characters, monsters, plants, and weapons — by striking them with the Book itself. This system ties the act of exploration and combat directly to the protagonist's world-judging mission, making the Book a constant presence throughout the experience.