Is it possible to create rooms, but have them randomly connect to each other in new ways each time the game is started? Kind of like a procedurally generated map in a roguelike game?
The short answer is yes.
Maybe start with Kerkerkruip, a recent I7 roguelike with source code available.
cool!
You might also want to look at this thread, which has some of Victor’s code in it and another approach or two.
You could also take a look at my extension Dynamic Rooms, which has some example code creating a random map.
See also chapter 3.2. in the Recipe Book for a couple of simple examples.