core: a minimal roguelike

4kib of hack `n' slash
permalink

Small games are the developer equivalent of sketching for artists: Their size enables them to be completed quickly while focusing on essential skills. Inspired by A Roguelike in less than 512 bytes, Core highlights the essential elements of traditional roguelikes in a small (~4iKb), readable program.

Core generates levels consisting of up to four rooms and stairs leading to the next level. Movement is limited to cardinal directions (using the arrow keys), and there is no command to skip a turn. Bumping into the generic evil in the dungeon will remove it from the map; being bumped will remove you from the game. Pressing q will quit the game.

Level 1. Our protagonist @ is in the upper-right room, with evil in the upper-left and the stairs < in the lower-left.

The source in C is released into the public domain. Core requires the ncurses library and can be compiled using

gcc -o core core.c -lncurses

It was developed on Haiku alpha 4.1 (binary) and has been tested on OS X 10.8.5 (binary). It should compile on other POSIX-compatible operating systems. Windows users should try pdcurses.