Page 1 of 1

realization of the dungeon

PostPosted: Tuesday, 12th February 2013, 20:57
by sidav
I'm interested in roguelikes realization. How the dungeon map is made in DC:SS, what is its data? (I don't undertood a lot from code diving.)
For example, in Rogue map is a complex of "rooms" that represented by coordinates of their upper-left corners and their width and height.
For another example, we can store level data in two-dimensional array(s) that filled by tiles. What system is using in Dungeon Crawl?
maybe i'm placing this topic in wrong forum section... if so, excuse me please.
p.s. sorry for my bad English.

Re: realization of the dungeon

PostPosted: Tuesday, 12th February 2013, 21:39
by mumra
It's a combination of terrain generated randomly by code, and a lot of typically much smaller hand-crafted maps using a special map syntax (these are called "vaults" and are placed randomly within the bigger code-generated layouts).

This is a very simple explanation but it's mostly the case, there are some exceptions.

A lot of the layout code is in crawl/dat/des/builder/layout*.des, and a little bit in crawl/dat/dlua/*.lua. All the hand-crafted vaults are in *.des files in other subfolders of dat/des. As you might guess from this, a lot of the layout code is written in Lua, although some of the layouts call C++ functions in the Crawl source code.

If you want to understand the vault syntax better you can start with the online reference: https://crawl.develz.org/wiki/doku.php?id=dcss:help:maps

It's very easy to start making these maps and new contributions are always encouraged (although read the guidelines first!); the more vaults get added the more interesting, diverse and surprising the levels can become.

Re: realization of the dungeon

PostPosted: Wednesday, 13th February 2013, 03:58
by sidav
Thanks. DC saves and works with each tile? or there is more abstract system like one in Rogue?

Re: realization of the dungeon

PostPosted: Wednesday, 13th February 2013, 11:55
by mumra
sidav wrote:Thanks. DC saves and works with each tile? or there is more abstract system like one in Rogue?


Yeah, there's a 2D array of tiles (and other properties) for each level.