How Did Rogue Generate Its Random Dungeons?

Posted by danschuller 13 hours ago

Counter22Comment5OpenOriginal

Comments

Comment by throwlifeaway 5 hours ago

Once every few years I find myself dumping many many hours into Nethack (the open source successor to rogue). Never once have I beaten it, despite playing usually with several tabs open to various wikis and guides. Eventually I die while on a super long run (by my standards) and totally give up in frustration, beginning the next several-year dormant period until the next time I play.

To any game developer planning to call their game with random upgrades a "rogueli[tk]e": play Nethack. Your favorite roguelike was almost certainly created by someone who did.

Comment by genpfault 8 hours ago

Comment by hosel 4 hours ago

I never got into Rogue, though I did love Nethack. If you’re into these actual rogue-likes, I picked up Caves of Qud recently, highly recommend.

Comment by avadodin 7 hours ago

I missed a definition for "random".

Did it have a specific PRNG and seed?

Was it platform–dependent?

Comment by McGlockenshire 2 hours ago

Literally the second line of the article addresses your questions by linking to the source code repo under discussion. Every single one of the sidebars about the topics being discussed links directly to the relevant code.

The article even tells you it's C. The copyright dates on the code are 1980ish. It's talking about rogue, not rogue.exe, so this is going to be on Unix, real Unix. So, it'll be using rand(), the bad one, surely, just by what it is and where it is. That completely answers all your questions.

All you had to do was click links.

edit2: lmao okay so I read the code myself and you'll never, ever guess what it does. It does NOT use rand().