Temple of The Roguelike Forums

Development => Programming => Topic started by: Krice on July 01, 2009, 07:14:32 AM

Title: Gnomish mines
Post by: Krice on July 01, 2009, 07:14:32 AM
Looking at the source code of Nethack's gnomish mines generator gives me a headache. Any ideas how the routine actually works? I guess you could generate cavern-like mazes in many ways, but I'm looking for a ready solution so I don't have to think.
Title: Re: Gnomish mines
Post by: ido on July 01, 2009, 09:01:50 AM
A popular way is to use cellular automata (http://roguebasin.roguelikedevelopment.org/index.php?title=Cellular_Automata_Method_for_Generating_Random_Cave-Like_Levels).

Don't know if it is similar to what nethack is doing, though.
Title: Re: Gnomish mines
Post by: Krice on July 01, 2009, 10:17:15 AM
Don't know if it is similar to what nethack is doing, though.

Nethack's routine looks more cleverer. Maybe I should plan the routine by thinking "what would gnomes do?" I already have a routine which can create dungeon features and mineral vein is probably something that gnomish mines could start with, then digging around and in them for mine activity. Add couple of store rooms and corridors between everything.