GrafixersCrew WhatsApp us

Home › AI Game Development › rot.js

What is rot.js? The free roguelike toolkit for JavaScript

rot.js is a roguelike toolkit in JavaScript — dungeon-related tools, an interactive manual, documentation and tests, for building roguelikes in the browser or in Node.js.

rot.js in one paragraph

rot.js (github.com/ondras/rot.js) is a roguelike toolkit in JavaScript. For more, the README points to the project site at ondras.github.io/rot.js, which carries the interactive manual and documentation. It is written in TypeScript, and its code is available in multiple formats — ES2015 modules you can use directly in modern browsers, a bundled form for any bundler, and a pre-built bundle with a global ROT namespace for a plain <script> tag. Most parts are also usable from Node.js.

The project appeared on GitHub in May 2012 and passed 2,700 stars by early December 2026. It is released under the BSD 3-Clause licence. Be honest about its state: its last commit was 2024-11-13, and the README itself describes the toolkit as largely “feature-complete” — it is a stable library with real users and real games built on it, not one under active development. Bugfixes, documentation and some new features are still welcomed.

What rot.js actually does

Building a roguelike means solving the same problems every time: generating a dungeon, drawing it, moving through it. rot.js is the toolkit that solves those problems once, for JavaScript.

1. The building blocks for a roguelike

rot.js is a roguelike toolkit — dungeon-related tools for building roguelike games in JavaScript, with an interactive manual, documentation and tests. The RogueBasin page linked from the README lists rot.js-based games, so you can see what other people have built with it before you start.

2. Four ways to include it, for four kinds of project

Use the ES2015 modules in lib/ directly in a modern browser with no transpilation or bundling; bundle the modules yourself with any bundler that understands ES2015 modules — the recommended way, with a Babel and Rollup example in the repo; include the pre-built bundle with a traditional <script> tag, which puts rot.js in a global ROT namespace and uses ES5 for older browsers; or use the minified version, which works the same with a smaller file size.

3. It works in Node.js too

Most parts of rot.js are usable from within Node.js. The Display class needs the "term" layout backend there — the README shows drawing @, % and # characters with foreground and background colours in a terminal display — and the pre-bundled package loads as a CommonJS module.

4. A build process you can run yourself

Development happens in the /src folder, and the build process creates the /lib, /dist and /doc folders. Rebuild everything with npm install and make all. The repository also carries examples for native modules, bundled modules, the pre-built bundle and Node.js.

Download and setup

Get rot.js by cloning the repository, by running npm install rot-js, or by downloading the prebuilt rot.js or minified rot.min.js file from the dist/ folder. Then follow the interactive manual at ondras.github.io/rot.js and the examples in the repository for your setup — native modules, bundled modules, a plain script tag, or Node.js.

What it costs

rot.js is free — BSD 3-Clause licence, no subscription, no paid version. The only cost is your own time building the game.

Who rot.js is for

Roguelike developers

You want to build a dungeon crawler, not reinvent dungeon generation. rot.js is the toolkit written for exactly that genre.

JavaScript and TypeScript developers

You build for the browser or Node.js and want a typed toolkit. The source is TypeScript, the output works in modern browsers and in the terminal.

Hobbyists and learners

You want a real project with a manual and examples. The interactive manual walks through the toolkit, and the RogueBasin list shows finished games to learn from.

Game jam entrants

You need a roguelike in a weekend. A toolkit with dungeon tools, a display and examples beats writing all of it from scratch.

rot.js at a glance

Honest limits

rot.js is largely feature-complete by its own description, and its last commit was 2024-11-13 — it is a stable toolkit with real users and real games, not one under active development, so do not expect new features to arrive. The README itself is short: the detail is in the interactive manual on the project site, so that is where you should start rather than in the repository. And it is a toolkit, not a game: it gives you the pieces for a roguelike, and the game — the design, the balance, the content — is still yours to build. Our AI game development service builds roguelikes and dungeon games on toolkits like rot.js, so you get a finished, playtested game instead of a weekend of setup.

Want a game without doing the setup?

rot.js is one of the toolkits behind our AI game development service: we build your game, playtest everything by hand, and hand over a finished game with its source code. Mini-games from £499, full 2D games from £1,499, 3D games from £2,999. You bring the idea; we do the building.

Have a game idea?

Tell us the idea — a sentence is enough. We will tell you what it takes and what it costs, honestly.