Four Ways to Make a Roguelike
I haven't made a game in a while, and I've come up with 100 reasons why I should change that, and the 7DRL Challenge has just given me reason 101. If you don’t already know, the Seven Day Roguelike (7DRL) Challenge is an upcoming game jam that focuses on building a roguelike game with the added challenge that the game must utilize procedural content generation in some way. While I was reading up on the rules of the challenge, I noticed a resource section, and inside that resource section were four different libraries/engines specifically for roguelikes. I took a look at all four recommendations and decided to share a summary of each:
Libtcod
Let’s start with libtcod, a C++ library for making roguelike games. Libtcod provides an easy way to implement common utilities used in roguelikes, such as a console, pathfinding, and field of view. The project includes example applications to learn from and has decent (somewhat outdated) documentation. The library provides a Python version of its API if you prefer it to C++, which is great for anyone who doesn’t know C++ or would rather not script in the language. The library's installation is about as difficult as that of every other C++ library. This project uses Microsoft’s vcpkg manager with CMake to install, but if you’re not intimately familiar with these toolchains, you’re likely going to run into some issues. Overall, this is a good choice for anyone who enjoys programming in C++, wants some solid roguelike scaffolding, and would like to avoid a GUI game engine getting in the way.
Rot.js
Rot.js is a JavaScript library modeled after libtcod. Since rot.js is a JS library, it runs in the browser, which means creating a web build for your project is easy. The library has solid documentation, a tutorial to get you started, and an interactive manual. The manual explains how to do some common things like map generation and pathfinding and even gives instructions on how to implement hex support. Installing rot.js is incredibly easy; with node package manager installed, a simple npm install rot-js is all you need to get started. This is a very impressive project that feels very capable and easy to use. The library is geared towards making old-school ASCII-style roguelikes (although there is a way to replace ASCII characters with images), so if you wanted to make something more modern, you’d have some hoops to jump through. Rot.js is a great choice for a beginner or anyone looking to make a classic roguelike game with little hassle.
JSRL
JSRL is a roguelike game template written in TypeScript. The game comes with basic functionality already implemented to get you started. Input, field of view, map, enemy, and inventory systems are all set up from the beginning. The idea is that you have a template as a strong base to extend and modify until it’s uniquely yours. Currently, there is no tutorial or documentation, so you’ll have to inspect the source code and figure things out yourself. Luckily, the source code isn’t too large, so if you’re interested, you may be able to figure things out quickly without documentation. According to the project readme, documentation will be released soon, so that’s something to look forward to. The installation is pretty straight-forward: clone or download the git repository, run npm install inside the root directory, and finally run npm run web for ASCII or npm run web:pixie for pixie.js graphics. Overall, this library is a good choice for someone who wants a solid template to start with and has experience reading and modifying other codebases.
T-Engine4
T-Engine4 is a Lua roguelike game engine. Some of the standout features of this engine are support for particle effects and online multiplayer. The engine documentation is solid but incomplete or sparse in some areas. T-Engine was used to create Tales of Maj'Eyal, which is an impressive open-source roguelike and a stellar example of what can be done with the engine. Getting T-Engine up and running in a developer environment isn’t straightforward and will take some time, but there is a guide on the T-Engine4 Wiki. T-Engine is a good place to start if you like its rich set of built-in features and plan to utilize them; otherwise, a lighter library like rot.js or jsrl may be easier to get started with and extend.
There you have it: a quick rundown of four custom engines and libraries designed to help you make an awesome roguelike game! I hope this gives you a little context for each engine and an idea of which one may be right for you, if any. Obviously, there is so much more that could be said for each project, but it would take quite some time to really dive in deep and get a feel for each engine and how it performs at scale. If you find any errors or would like to add anything, please let me know. Thanks for reading, and good luck if you decide to enter the 7DFPS game jam!
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.