How to implement a Roguelike

Roguelike dungeon
From Wikimedia

A roguelike is a character based fantasy game. By character I mean @^! not an individual as such! A question on the C SubReddit had asked about Project ideas for simple applications and someone had suggested a Roguelike. It’s not a bad idea but probably quite a bit more than just a simple project.

So I suggested breaking it down into stages. Here’s what I said.

Rather than a roguelike in one go (that’s a actually quite a bit of code) so do it in these stages.

  1. A Dungeon level generator. Create rooms and link them by corridors.

  2. Generate a bunch of levels – link them via randomly stairs, pits, transporters.

  3. Add random monsters and treasures in rooms.

  4. Implement a moving player able to navigate through the levels.

  5. Add combat. Weapons, range weapons, spell casting. Add monster hit points.

  6. Turn it into a polished game. Add everything else needed. Permadeath, collecting treasures. Moving monsters.

  7. (Optional) Make it multiplayer and allow PvP.

PvP means allow Player v Player combat. Doing it multiplayer is actually quite a lot of work which is why I made it an option. Rogues are often created using simple ASCII chars for monsters and treasures. Some programmers have used graphics and there are plenty of free graphics sets for 8 x 8 or 16 x 16 pixel sized monsters etc. like the Kenney.nl microrogue set. Shown in action below.

Kenney.nl micro rogue set in action

I am tempted to make this the 3rd game idea for the Raspi game book. 30 years ago I created a multiplayer postal game Quest that is still running albeit on the web not by post. That included a dungeon generator. It wasn’t in C but it’s easy enough to translate Turbo Pascal to C.

(Visited 1,322 times, 1 visits today)