MicroRealms is a minimal adventure game in the style of games like Dungeons and Dragons. It was written for a microcontroller (NXP’s LPC810) with a UART interface but could be ported to another platform quite easily (rewrite the contents of serial.c). Given the very limited resources typically found in a microcontroller (the LPC810 has 4kB or Flash memory and 1kB of RAM) lots of imagination is required to fully appreciate the game. Many games have hidden “easter eggs” i.e. some additional feature that is only revealed after you perform a particular sequence of operations. The easter egg in MicroRealms is that it contains a game within a game. This “hidden” game is a challenge to all to improve (or port) MicroRealms within the limited program and data space available.
Special thanks to Sam Duignan and Oran Duignan for design, test and demonstration.
Code is available for download here
Realm is displayed in ASCII characters as shown here. The player is represented by an ‘@’ symbol.The map legend shows the meaning of the other symbols. Generally capital letters represent BAD GUYS (apart from X – the exit) while lower case letters are good things. You can view the map during the game however be aware – each look at the map costs you a gold piece and the goal of the game is to amass as much gold as possible. If you need help at any point press H.
You don’t have to compile the game, a compiled version is provided in main.elf. You need a chip: the LPC810 – I got mine from Farnell at around 1 euro each) and a USB to serial converter. A breadboard (protoboard) is required along with a couple of resistors and buttons. (See circuit diagram). The next thing you need to do is to get the program on to the chip. I use lpc2isp for this. In order to compile the game you need a cross compiler for the ARM Cortex processor. You can get one for your platform here: https://launchpad.net/gcc-arm-embedded
You will also need some version of GNU make. On a Debian based Linux system (including Ubuntu) install the build-essential package. On a Windows system install MinGW and its MSYS component.
One thought on “Microrealms on the LPC810”