I'm pushing the clock here, as I'm not going to write tonight like I should, but I'm going out to see the film Wonder Woman, which I hear is good to women. I'm certainly hoping that it is.
Let's invent a basic dungeon room and then examine that room in terms of structure, function and behavior, to better understand how designing works. People get quite muddled about this and, while not their fault, it is helpful to be clear about things.
As a reminder, "structure," from the Latin structura, is the manner in which things are fit together, built, constructed, arranged or ordered, in the sense of how they are assembled and joined in order to create the bare bones of the project. Thus, the structure of the room is as follows: the room's dimensions, the fabric from which the room is made, the contents of the room, the fabric from which the contents are made, the arrangement and dimensions of the contents and the physical relationship of the contents, from the point of view of the maker that is in a position to know every detail about the actual room. If we wish, we can also discuss the manufacture of the room and its contents, since that is relative to the structural process.
So, we have a room that has been manufactured by two basic means; first, that an entity has constructed the room by excavating the stone and then finishing the room according to the premise for its construction: in this case, a room that is 20 feet by 20 feet, with a typical dungeon door in the centre of two opposite, facing walls, with a 9 foot diameter fountain in the middle of the room, upon a parquet floor. The lip of the fountain is 2 feet above the floor and the centerpiece of the fountain is 6 feet above the floor. The centerpiece is a basalt stone woman, dark violet in color, adorned with wings and a peasants dress, holding a small infant that is clearly not a human but is of an unknown humanoid race. The fountain is powered by water pressure, through a drilled pipe that delivers natural water from a higher water source outside the dungeon, so that it runs continuously even at the present. There are no other constructed objects present in the room that have come about as a part of the this entity's original design.
The second means of construction has been time, several hundred years, over which time erosion, pressure and perhaps seismic activity has caused the fountain to break, causing water from the fountain to stream continuously over the parquet floor, enabling plants beneath the floor to emerge through the floor's crack and steadily destroy the cohesiveness of the floor's tiles. Since there is no sun, the plant life is little better than lichen, but endless generations of lichen have died and deposited compost upon the floor, so that now it is more plant and "dirt" than it is stone flooring. In places the walls are cracked, showing dark gaps as thick as two fingers. As the fountain is still spurting water, through several cracks breaching the lip of the fountain, the floor is spongy and damp. The fountain water is green and polluted with algae. The odor is musty and foul with rotting vegetative matter.
Finally, a green water snake has somehow found its way into the room, where it resides most of its time living in the water, moving out of it to search for food in the way of insects that it can reach through gaps in the wall. Inside the water snake is a poison sac.
This is the structure of the room. Take note that we do not describe the manner in which any of the things in the room are meant to interact with the players. These things are not part of the room's structure.
"Function," on the other hand, is the manner in which the structure does work, or the purpose of the structure, or the manner in which the structure is intended to interact with its environment. Specifically, how does the room perform? Why have we included it in the dungeon? We're not making the room to satisfy the purpose of the entity that made it, but the purpose of responding to the players' free movement in the rigid structure. Think of it in terms of why we make a car or why we make shirts for everyday wear. The "why" is not part of the structure; the structure is an answer to the need, but these are not the same thing.
The function of the poison in the snake's sac is to find its way into the body of a player; so the snake is likewise intended to be put in proximity to the player in order to effect the transfer of its poison from sac to player body. To accomplish this function, the snake is difficult to see among the polluted water of the well, which itself exists as the single enticing element of the room the players will feel compelled to investigate. Once the players begin to move through the room, a sign of the water's movement should be suggested, or any other clue, that will induce a player to move close enough to the fountain to attack the player character.
In turn, the sponginess of the floor is there to discourage rapid movement by the players, so the amount of give in the floor should be emphasized to create doubt, suggest a trap, suggest that the mold growing on the floor among the lichen might be legitimately dangerous and that the floor itself might perhaps be alive or otherwise threatening. A slower movement across the floor will cause a greater likelihood of players becoming interested enough in the fountain to investigate its contents.
Nonetheless, I need to emphasize at this point that while this is the purpose of the room, and the basic expectation of the DM as the designer, this does not describe the player's actual interpretation of the room nor what they will do.
"Behaviour" describes the range of actions and free movement of the user of the room, once the room has been presented for examination. Behaviour consists of the user's actions, evaluation, investigation and manner when confronted with a structure and its function.
Depending upon their proclivities, a group of players may exhibit none of the expected responses to the floor, the fountain or the snake; they may frankly choose to examine nothing and to act in such a manner that the snake, and ultimately the function of the poison, is never engaged.
Behaviour can be reasonably accounted for and to some extent predicted by designers who are thoroughly engaged in the sphere of their design, but ultimately any function of any design can fail to meet those expectations as users have minds of their own. The great struggle for design is to create functions that will produce instinctive, reliable, useful and effective behaviours in design users. When the users fail to respond as expected, that is an error in design ~ and possibly in the implementation of that design, where it comes to the presenter.
A successful design, one that produces the behaviour desired, relies considerably upon the presentation of that design, in the form of marketing, awareness, description, ease of use, user trust and a whole lot of other factors which can sink a perfectly viable design through mishandling of the user's experience. Therefore, once structure and function have been determined, it is up to the designer to evaluate the behaviour of the user in order to return to the drawing board and come up with a better design and a better function in order to relate better to the user's expectation and probable interest.
There. That should be pretty clear. Structure. Function. Behaviour. Your world relies upon you understanding these three elements, making them fit better together and having a clearer idea of how the best possible function, supported by the best possible structure, produces the best possible user behaviour.
This isn't a new problem. Every design company in every field of endeavor, from battleships to fidget spinners, works tirelessly on making the computation between these three elements come out exactly right.