# Laws of Nature

LLMS index: [llms.txt](/dvw/en/llms.txt)

---

The physics of virtual worlds is based on real-world physics. There is a reason for this.

If I push on a door, the door opens. If I push on a virtual door, the virtual door opens. I could just as easily make it that if I push on a virtual door, virtual birds fly out of a virtual mug. Unless the door was flagged as No Ordinary Door and the mug was flagged as No Ordinary Mug, this would confuse people. Why? Because human beings learn from an early age the cause-and-effect rules that govern the way reality works. In a virtual world, they are unable to stop themselves from applying these same rules except by an act of will. For virtual worlds therefore, anything that interferes with these rules acts as an out-of-context interrupt; anything that adheres to them implicitly supports the illusion that the virtual is real.

The real world operates under the laws of physics. The rules that people develop in their heads to model the laws of physics [^73] are simpler, but they’re good enough for almost all practical purposes. Virtual worlds wishing to be convincing to players must therefore implement at least these rules (and, paradoxically, perhaps no more; it’s players we’re trying to convince here, not reality).

Fundamentally, therefore, virtual world physics is concerned with implementing the obvious.

The key is transparency. Transparency means that players don’t have to suspend any disbelief, because their senses pass the information right by without comment. The more successful a designer is at creating transparency, the less his or her work will be noticed: This is great for immersion, if not so great for the designer’s ego.

The expectations that players have of a virtual world’s physics don’t have to map directly onto reality, if the context is right. The most conspicuous example is that of a genre boasting its own physics: cartoons. In cartoons, when you run off a cliff you don’t fall until you realize you ran off a cliff. The laws of nature do apply, just not in the same way [^74]. As long as people buy into the fiction, this can work. Toontown can be as immersive as EverQuest.

The central issue for virtual physics is the level of detail at which it operates.

If I let go of an object, it will fall. That’s gravity in action. When it hits the ground, will it bounce? Will it become damaged, perhaps break? Maybe the ground will break? What if the ground is at an angle? Will the object roll down it? That depends on the object’s shape, its mass, what it’s made of, what the ground is made of, and so on. If there’s a wind, what effect will that have?

If there’s an object between the one I drop and the ground, what then? Will it trap the object; will it let it pass through; will the object bounce off or out? I could drop apples into a wicker basket, but how many would fit before it becomes full? Even if it were full, I could still add sand to it, if not apples. Then I could add water, which would be retained for a short while, but would eventually trickle out. Maybe if I’d added cement dust as well as sand it would have set instead.

That’s just the start of it. The physics of a virtual world must address all kinds of issues that the real world implements trivially. How long does a feather dropped out of a window take to land? Why does my compass point north? What happens when I shine my flashlight at a mirror? How long does ice last? Who will get wet if I throw a bucket of water at a crowd? Can I dismantle a bookcase and use the pieces to make a raft? What if I set fire to a wooden house?

The real world can answer all these questions because that’s how it works. It has molecules and atoms and atomic particles and quarks and who knows what else, all working together under the influence of at least four forces [^75]. Virtual worlds can’t hope to compete with real physics. Unfortunately, as the above examples illustrate, virtual worlds can’t cope with naïve physics yet, either.

That said, the virtual worlds of today have access to greater computational resources than those of yesterday, and it’s not unreasonable to suppose they could have better physics as a result. At a time when modeling tools are available to perform real-time ray-tracing, fluid mechanics, fabric deformation, and surface friction effects, it’s a little sad that virtual worlds rarely bother to implement concepts even as simple as “if you drop this in water it will sink.”

There are practical limits to what can be done. As detail increases, the number of active components increases and the number of interactions between them goes up exponentially [^76]. Throwing more computers at the problem will not even dent it. That said, if MUD2 can let you drop an object down a well into an underground stream which carries it off until it reaches a grate that may or may not trap it, all the while accounting for object density, impact damage, water damage, and the possibility of hitting or being caught by someone, then there’s no reason a large-scale graphical virtual world couldn’t do better. The trick is not to implement all of physics, or even all of a naïve physics, but to implement just enough naïve physics to satisfy players’ sense of detail.

That’s still harder than it sounds.

Virtual worlds operate at the level of commands. Players decide what they want to do in terms of effectively indivisible operations, and these make up the command set. They want to wear a pair of boots, they don’t want (for each boot) to loosen the laces, pull it on, tighten the laces, and then tie them in a double knot. Simple goals that in real life most people could achieve without really thinking should be implemented in virtual worlds as such. Believe it or not, for MUD1 Roy and I actually discussed these things before deciding exactly where to pitch actions. That’s why we went for “unlock door” rather than “put key in door; turn key; remove key from door.” It’s also why we made “lock” and “door” be synonymous nouns.

To implement physics, you only really need to go one conceptual level beyond that of the deepest command. Anything deeper than that, the players won’t see anyway. If a character can shoot an arrow, the virtual world engine should be able to show its flight and make its arrival be non-instantaneous; however, this doesn’t have to be done by applying Newton’s Laws to parabolic trajectories—it just has to look like it was done that way.

There is an argument that a deeper physics model can be used if it’s less complex than a shallower model or if several complex shallower models can be built from it [^77]. For example, if you have a good Newtonian simulator already built to implement your virtual tennis games, you may as well reuse it for arrows. This is reasonable, assuming you really did need the simulator for the tennis. In practice, it’s programmers rather than designers who are more susceptible to going too deep: You may have specified that characters’ breath should be visible in cold air, but it’s not you who’s spending 10 days implementing a brilliant new eddy-calculation routine.

So to summarize:

- Compiled into players’ heads is a sense of how the real world works.

- If the virtual world mimics this, it helps immersion tremendously.

- Players need rarely think beyond the level at which they can “just do” something.

- This is the level at which commands should be written.

- The physics usually needs to be constructed only at the next level beyond this.

- The problems come from the fact that in many cases the physics is not written even close to this next level, if indeed they’re written at all.

This being the case, designers have only limited ways to respond. In worst-first order, these are

- Brazen it out. The virtual world has ponds; players can walk on the surfaces of the ponds; big deal.

- Knee-jerk reaction. Players can’t walk into ponds, for no in-context reason.

- Remove the symptoms. Players can’t walk into ponds because the vicious fish that live there keep them out. This provides an in-context reason, but it’s invariably feeble.

- Paper over the cracks. There are no ponds in this virtual world.

- Implement the physics. Characters who walk into the pond can stand there with water coming up over their knees and wetting their clothes as expected.

Players’ commands imply the virtual world’s physics. In deciding the level of physics to implement, designers should therefore look at commands.


[^73]: These rules are called naïve physics, and are an example of qualitative reasoning. Patrick J. Hayes, The Naïve Physics Manifesto. Donald Michie (ed.), Expert Systems in the Micro-Electronic Age. Edinburgh, Edinburgh University Press, 1978. Johan de Kleer, Qualitative and Quantitative Reasoning in Classical Mechanics. Patrick H. Winston and Richard H. Brown (eds.), Artificial Intelligence: an MIT Perspective. Cambridge MA, MIT Press, 1978.
[^74]: See Cartoon Laws of Physics, which exists in several versions. http://funnies.paco.to/cartoon.html and http://www.bbc.co.uk/dna/h2g2/alabaster/A645095.
[^75]: Gravity, electromagnetic, strong nuclear, weak nuclear. There may be others yet to be discovered.
[^76]: As does the number of potential exploits.
[^77]: A virtual world’s physics can itself be regarded as a model for implementing higher-level effects. Consistency benefits from this: If you can get the physics to handle some set-piece event, it’s usually better than if you hard-code it separately.
