Properties
Properties are abstractions of objects’ physical characteristics. In virtual worlds, this regularly extends to non-physical properties as we shall shortly see, but it’s the physical ones (mass, density, shape, color, and so on) that dominate.
Properties are often implemented as functions, so that rarely used ones can be computed on a when-needed basis. However, although properties don’t change any values when they are called, functions in general do: Checking the “diameter” property of a balloon won’t change its diameter 1, yet calling the “inflate” function on the balloon might. In terms of implementation, though, they can look the same.
Properties have an uneasy relationship with object classes. Does a dropped bottle shatter because as a bottle it’s a subclass of “fragile objects”? Or does it shatter because it inherits a high-value “fragile” property? How much encapsulation do you need? Perhaps it shatters because it has a “made of” property with value “glass,” and glass has a high-value “fragile” property?
Creating a taxonomy that allows the physics to be implemented but doesn’t turn designers into programmers is a tricky area (made all the worse because many designers started out as programmers). Strictly speaking, it isn’t a naïve physics problem, but an issue of representation.
Unfortunately, there aren’t really any conventions at work here (yet). You just do what you have to for your physics to work. All I would recommend is that you allow for properties to be objects (in the object-oriented sense) too, so you can quantify over them. If you can get the virtual world engine to answer the question “give me a list of all the properties of this object and their associated values,” then that should be flexibility enough.
As an aside, lists of existing properties are very useful to have around when you’re looking for new ways to discriminate between objects. “What should this magic shield do apart from add the usual protection bonus? Hmm, characters have properties for height, mass, speed, hmm…eye color, hirsuteness—hey, I could make them hairy if they used the shield! That could really freak people out. I’ll make it a dwarfen shield because dwarfs value beards, females included, and….”
In an ideal world, could all functionality of objects be derived from their properties? Yes—in an ideal world. You could see that an object has a hard, thin, flat, robust, semi-sharp surface attached to a long, strong, lightweight but not brittle second component topped by a horizontal bar, and from that deduce that the object was suitable for digging a hole in a lawn. Virtual worlds are non-ideal, because this degree of functionality deduction would overwhelm it. Being non-ideal worlds, you can dig a hole with a spade because the “dig” action knows about spades (and maybe shovels and pickaxes). Beyond that, you can’t make a spade out of a busted shield and a fence post.
So sorry fans of assemblies: You’re unlikely to get them this way soon, either.
Naïve physics doesn’t have an uncertainty principle. ↩︎