Phantasmal MUD Lib for DGD
|
Phantasmal Site > Design > Specifying Perception Specifying Perceptual ThresholdsIn our hypothetical perfect version of Phantasmal, visibility is a tremendously important and involved thing. There's a lot to it. Perception is determined by the character and the game engine. Whether there is a single 'Perception' characteristic which determines the character's acuity in all senses or a tremendously involved and detailed set of skills for many different situations and senses, still the game engine will eventually come up with a number representing the player's perceptiveness in that sense, at that given time, in that exact situation. The game engine will also need to figure out how to determine the difficulty of perceiving an event in its specific sense. For instance, an ant's movements might be visible to somebody searching, or who had very good eyesight - how visible? A number must be assigned somehow. This document attempts to answer the question of how that number should be assigned, and how the game engine will process the results in different situations. AudibilitySound is relatively easy, so I'll address it first. Let's assume that the basic audibility number is about how loud a sound is. Normally a high value for perception is considered a good thing, and means the character is likely to be successful. So let's treat a high perception value as meaning the character can hear very soft sounds, and a high difficulty number as meaning the sound is very soft and hard to hear. Let's say that a sound with twice the difficulty to hear is half as loud. So a sound with a difficulty of 2 is half the volume in decibels of a sound with a difficulty of 1, and twice the volume of a sound with a difficulty of 4. For the mathematically inclined, that means that the volume in decibels is equal to 1 over the difficulty number times some constant. In a space full of air with no other objects, you'd expect that being twice as far from a sound would make it one-quarter as loud (the inverse square law), or four times the difficulty number. However, in a real setting, you'll find that sound (like light) bounces off things, so the real falloff of light is more like one over the distance than one over the distance squared. So being twice as far away would mean being half as loud. So here's what we need to know for sound... We may need to know how far away a thing is — just in case we need to do some kind of weird falloff. We need to know about how much sound is absorbed over a particular distance, from room to room. We need to know how loud (perceptible) the original sound is. Between those things, we pretty much have all we need. Vision and LightEverything we said about sound holds pretty true for light, but vision and light behave differently from each other. Light, like sound, could be measured on a difficulty curve where being twice as high a difficulty means half as much light. But vision is harder to measure reasonably. Light attenuates over distance — that is, a torch that is in a wall sconce fifty feet away won't provide nearly as much light as one right next to you. Like sound, it attenuates approximately linearly if you're indoors — being twice as far away means you get about half as much light. If you're outdoors in a big clear area you're more likely to get inverse square behavior, so being twice as far away means you get one fourth as much light. We'll ignore that for now. Still, it's all pretty much the same way that sound works. Vision, however, is not the same as light. Vision includes not only whether you can see something at all, but how much detail you can see. If the torch is too far away, you can light somebody up with a lamp right next to them. However, if they're too far away, you can't do much to fix seeing the details without a telescope (note: a telescope would probably count here as increasing a player's perception). If you see somebody reflected in a funhouse mirror, you're getting all the light reflected perfectly, but you'll still get reduced vision. Vision is harder to measure mathematically. You can measure sound in decibels and light in candlepower, but there's not really any measurement of how clearly you can see details. Obviously distance and intervening obstacles can change visibility — think of seeing somebody through a thin hedge or a thick fog for a moment. But it's not clear how to measure that. Do you measure based on how much of them you can see? The funhouse mirror wouldn't reduce that at all, yet it still makes it harder to figure out what they look like. Do you measure by how distorted they are? The fog wouldn't do much anything to that, but it certainly reduces detail. The short answer to all these questions is "yes". Yes, we'll count visibility as being reduced if you can see less of the person. Yes, we'll count it as reduced if they're distorted. Once we figure out how much light we have on them, we'll reduce visibility if they're in the dark (note that it doesn't matter whether we are in the dark while trying to see them. If they're lit up and we're standing a hundred feet away in the dark, we can still see them just fine). Let's think about visibility in terms of seeing a red square. You'd like to be able to see it as being the right size, as being a square, and as being red. Anything that makes it harder to tell any of those things will reduce visibility. Distance will make the square look half as tall when you get twice as far away, so if everything else is perfectly the same, being twice as far away will make the difficulty of seeing something twice as great. However, additional factors like darkness, fog and obstacles will certainly reduce visibility even farther if they are present. VibrationIt's easy to tell how touch and taste are affected by distance. If something isn't directly in contact with you, you can't touch or taste it. Temperature and smell propagate, but you still only notice the smell or temperature of the place you're in, even if heat or stench slowly drifts in from the next room. However, vibration is a bit different. Vibration travels through the air and the ground. It includes sound, sort of, but even a deaf person can feel vibration through the ground, and vibration through the ground is definitely more felt than heard. Vibration normally travels in an expanding circle along the ground, so its power will be diffused into a linearly-larger area. That is, a circle with twice the diameter is twice as far around. However, it's possible that spreading into a sphere underground, which I assume vibration does, will make it more of an inverse square thing like sound or light. So, like sound or light, seems like vibration is sometimes linear falloff and sometimes inverse-square falloff. On this one, I have no real data so I'm just guessing. Propagating Smells and TemperaturesSome things, like smells and temperatures, are carried by air and slowly diffuse through it. They tend to spread slowly, or be carried by the wind. Currently there is no wind in Phantasmal, though you could extend this stuff to include it without too terribly much trouble. So let's talk about the propagation of smells and temperatures in approximately still air. This assumes normal breezes and so on, but no significant overall wind direction. We'll actually want to know about how big an area is for this one. A very large area with a high temperature or an intense smell will cause a lot more heat or smell in surrounding areas than a small area with the same intensity. That doesn't mean that if you want a smell to spread you should light your incense in a big room. It means that your incense will make a much less intense odor in a big room because there's a lot more air to soak up the smell. Remember that with smell, outdoor areas will tend to get rid of some of it entirely. There's a whole upper atmosphere for your smell to diffuse into that may not be modeled as explicit MUD areas, but it certainly exists. That means that a certain percentage of the smell in any given room will disappear through an extra virtual exit and never come back. Temperature is likely to be similar - outdoor rooms will be naturally temperature-regulated to some degree, and the heat will naturally trend toward the prevailing outdoor temperature. Heat, in fact, will have a similar effect indoors - the stone, dirt, wood or other wall material will have its own temperature, and it will radiate some of it into the air. You'll also lose a bit of smell indoors to 'settling' - some odors, like smoke or incense, tend to be heavier than air and the particles are prone to settle out of the air and stop being smellable. Others are lighter than air, but still manage to layer themselves on the walls or ceiling, which naturally causes the odor to disappear from the air. Some smells are more easily dispersed than others in this way. Heavy particulate like smoke tends to disappear very quickly, but may leave a smell on nearby items. It's not clear whether Phantasmal can or should model the 'leave a smell on nearby items' behavior since that seems to behave differently than normal smell propagation. |