This is something I (and other people) have been going on about for a while, and it seems worthwhile to put a summary down so there can be a common point of reference.
Traditionally, the Angband dungeon (or town) had three layers - where by layers I mean things that could be in any particular spot. These were
Now this is roughly still the case, but some variants (notably S and NPP) have introduced another layer for "effects" - which includes things like traps, clouds of gas, spider webs, etc. In this model, some terrain like traps and glyphs of warding move to the effects layer, which allows traps on tings like doors and trees (if you have them).
But there is a lot more information about properties of dungeon squares, largely incorporated in the CAVE_* flags. This has started me thinking about what the layers "should" be, and I have come up with the following potential candidates:
So it would be fairly easy (conceptually) to establish nine separate layers, but I'm inclined to think that some of these are better handled together as currently. I think my favoured model is monster, objects, terrain (all), effects including lighting and traps, and location including player-dependent stuff. The main change there is to move lighting from location to effects; that's a gut feeling rather than a considered opinion.
Any thoughts welcomed.
Traditionally, the Angband dungeon (or town) had three layers - where by layers I mean things that could be in any particular spot. These were
- Terrain: Floor, rock of some sort, trap, door, stairs, etc
- Monster: Maximum one per square, includes the player, restricted by terrain (eg most monsters can't be in rock)
- Objects: Originally one per square, then potentially lots per square, only allowable on floors
Now this is roughly still the case, but some variants (notably S and NPP) have introduced another layer for "effects" - which includes things like traps, clouds of gas, spider webs, etc. In this model, some terrain like traps and glyphs of warding move to the effects layer, which allows traps on tings like doors and trees (if you have them).
But there is a lot more information about properties of dungeon squares, largely incorporated in the CAVE_* flags. This has started me thinking about what the layers "should" be, and I have come up with the following potential candidates:
- Monsters: Obvious
- Objects: Obvious
- Terrain: This becomes less obvious the more you think about it. There's an argument for there actually being two layers here - the floor, and what's on it. This becomes more forceful if you have terrain types like lava or ice.
- Lighting: Currently handled by CAVE_GLOW, and also affected by the player's light radius. Note that Sil makes a lot more use of light and dark.
- Location: The square is part of a room, or a vault, or something. This actually has lots of potential uses - themed areas of a level, for example.
- Player-dependent: The map as displayed is a combination of the world as it is and player knowledge - reflected in flags like CAVE_VIEW for visible squares, and CAVE_SEEN for squares the player has seen at some point. This is also relevant for the perennial issue of whether the player should see a monster opening a door on the other side of the level. Which bits are trap-detected is also part of this.
- Traps: Obvious - includes monster traps for variants that have them, and glyphs of warding.
- Other effects: NPPs gas clouds and FA's webs are examples.
So it would be fairly easy (conceptually) to establish nine separate layers, but I'm inclined to think that some of these are better handled together as currently. I think my favoured model is monster, objects, terrain (all), effects including lighting and traps, and location including player-dependent stuff. The main change there is to move lighting from location to effects; that's a gut feeling rather than a considered opinion.
Any thoughts welcomed.
Comment