Roguelikes are defined by two key things: perma death and procgen. Permadeath is super simple to implement, but that’s not the case with procgen. There are thousands of ways, how you can implement it, and today we are going to look underhood of the Burning Knight engine (it’s called Lens, btw), and see what type of monsters live there.
Popular methods of generating a dungeon layout
Source was not found, but the gif is too good
Cellular automate algorithms allow you to generate cave-like worlds with really little code.
You create a grid of "cells" (that are usually just booleans, because they have can be only dead or alive), and randomize it.
Then you do a few passes over the whole grid, applying some simple rules over it. In most cases, its all about calculating how many alive neighbor cells does a cell have, and deciding based on that should it live or die.
To be or not to be…
If you want to learn more about this method, I recommend reading this article.