   Roguelike dungeon
  If i were making a roguelike, i would need some form of structure for the dungeon. Would this "dungeon object" be considered an entity which i add to the world, or is the dungeon the actual world container like a scene graph might be. Im thinking about how to use component entity objects and in the past iv had a world/entity manager which keeps track of entities and tells them to update. A simple list of entities. When thinking about how i would make a roguelike iv been unable to figure out how to represent the dungeon with components (since i would think the dungeon might keep track of all other entities anyhow, player monsters, items etc.) and think i might be coming at it from the wrong direction.   
  I'd probably consider the dungeon to be the world itself. Would there ever be anything in the world that isn't in the dungeon?What data do you actually need to store about the dungeon, and how do you need to query that data? I'm guessing you need to do things like find out which rooms are in a given floor of the dungeon, and then which entities are inside those rooms. Your data structures will generally want to reflect the way in which you want to use them.One thing you can always do is have your entities appear in multiple lists. Your dungeon can have a global 'all entities' list that you scan through to update everything, and *also* per-floor or per-room lists that you just use for rendering what the player can currently see, and so on. It requires a little bit more tracking as entities move around, but it's not too hard.   ;Roguelike Development articles.