Universal Laws of Game Design - Volume 6
(Continued from Volume 5)
Designing a game is a monumental task, since it is a multidisciplinary system which involves vastly different faculties of mind. This requires us to begin the process of developing a game from bottom up, starting from a common ground of knowledge which can easily be understood by experts of any kind as well as laymen. And in order to devise a groundwork for such a shared medium of understanding, I have been drafting a purely mathematical (i.e. devoid of particulars) and minimal model which may be considered a generic archetype of any type of game we can think of.
And the principles which were established to let us enrich this model without introducing too much complexity have been suggesting that the gameplay system, as a whole, must always be extended in both a quantitative and additive manner - "quantitative" because irrational ideas are prone to stray our attention off to mere wishful thoughts, and "additive" because the notion of expressing a large-scale system as the sum of its parts is the most straightforward way of ensuring that we won't have to frequently add new rules in order to increase its robustness.
In the previous volume, however, we saw the difficulty of applying the principle of additive composition without limiting some of the core design factors such as mutually exclusive actions, condition-driven actions, and so on. An angry cow, for example, cannot be eating grass and attacking a person at the same time, despite the fact that it is logically sound from the point of view of additive composition to simply let these two actions independently trigger themselves at any time.
Preserving a sense of additivity while also preserving our ability to design conditional phenomena, fortunately, is not an impossible task. Individual atoms can be allowed to communicate with one another without crossing the borderline of their modularity, as long as they do so by only interacting through an external medium such as a message router.
Here is an example of how it could be done in our angry cow example. As explained before, the angry cow must both be able to chase/attack a nearby person and be able to eat nearby grass, yet it must not be allowed to carry out these two actions simultaneously. The trouble is, such a constraint is not realizable as long as we force the cow's weapon (horns) and its mouth to make decisions on their own without checking each other's current status.
A method we can use to solve this problem is to imagine each atom as a signal transmitter.
It is possible for an atom to communicate with the external world as long as it is capable of emitting and receiving signals (A "signal" can be thought of as a theoretical particle which carries information, like a message). And the idea is that even if there are atoms which are not directly interrelated at all, they can still indirectly communicate with each other by emitting and receiving signals.
Ever since the introduction of the concept of "inside" and "outside" in volume 2, it has been implicitly assumed that each atom is able to contain another atom inside of its own body, as opposed to its outside. One of the practical necessities of this logic, illustrated in volume 2, was to allow each atom (such as one which represents a biological organism as a single mathematical point) to either absorb resources for the purpose of replenishing its own energy, or to carry another atom from place to place by first picking it up, visiting the destination, and then dropping it.
Such a set of mechanics can be used for communication purposes as well, if we suppose that a signal is also an atom. For instance, we can build an inter-atomic communication protocol by saying that the process of sending information from atom A to atom B is the same thing as letting atom A emit a signal and then letting atom B receive it. And the benefit of this is that neither of these two atoms is required to assume the presence of the other because they only communicate by means of third-party entities called "signals".
This method of reasoning is highly valuable when it comes to the problem of explaining causal relations between atoms. A cow's mouth perceives a nearby grass as a resource which it should approach and eat. The question is, how does it recognize the existence of the grass in the first place? If we simply let the cow's mouth and the grass directly reference each other by means of explicit relations such as "resource" and "obstacle", we will be creating interdependencies that are destined to confound the whole system beyond the grasp of our control. So while the concept of direct atom-to-atom relations is an easy way to express the semantic implications of a set of atoms, it should rather stay as a convenient fiction which does not pertain to the inner workings of the system.
Let's contemplate the nature of communication from a practical point of view. When there is a chair in front of us, we observe it and recognize it as a chair; then we make a decision such as "I am going to sit on this chair" based upon the fact that we are interpreting the objective of our observation as a chair. This means that any chair-related decision ought to originate from the act of observing and identifying a chair. How does it happen? Well, the chair emits light particles (i.e. "signals") and our eyes receive them, which effectively engrave a photographic image of the object upon the surface of our consciousness. We then recognize visual patterns in the perceived image which, after a brief interval of classification and other subsidiary processes, lead us to conclude that the signals which our eyes received are the proof of existence of an entity called "chair" within our field of view.
The same exact reasoning, which bases the framework of causality upon the idea of signal transmission which takes place under the presence of an intermediate medium, can be applied to the case of the cow's mouth recognizing a nearby grass as its resource. The grass emits its own "grass signals" which are particles moving radially in empty space. These particles are not immortal, though, so they gradually decay and finally disappear after a designated length of time. As a result, this creates a cluster of grass signals around the grass atom's center of emission, whose density decreases as the radial distance from the center increases.
The cow's mouth, on the other hand, possesses a tendency of receiving any adjacent grass signals and temporarily storing them in its internal receptors (I am saying "temporarily" because each signal has a limited lifespan). The number of receptors indicates the maximum number of signals that the cow's mouth is allowed to hold within itself at any moment in time.
Due to radial spread of signals as well as their temporal decay, the probability that the cow's mouth will be receiving a grass signal at a random point in time is bound to increase as the cow's mouth gets closer to the grass and decrease as the cow's mouth gets farther away from the grass. This means that the rate at which the receptors of the cow's mouth gets filled up with grass signals, by nature of statistics, will tend to be inversely proportional to the distance between the cow's mouth and the grass.
So, how will such an interpretation of the world influence the way in which we determine how an atom recognizes another atom and reacts to its presence? The illustration above certainly seems to complicate the whole matter a bit too much, and indeed the idea of simulating the movement of every individual "signal particle" in real time is not going to apply well to a videogame when it comes to computational efficiency. The physics-like model shown above, therefore, should be considered a proof of a concept rather than an actual implementation.
The point of demonstrating the process of atom-to-atom communication in terms of continuous signal emission and reception is to show how a robust decision-making logic is able to emerge out of a collection of purely mechanical phenomena rather than a pile of arbitrary rules that are hard to manage.
In the previous volume, I have mentioned the technical difficulty of allowing both the angry cow's body and mouth to exhibit their own behaviors in a disjoint (mutually exclusive) manner. If it were okay for the cow to chase the person and eat the grass at the same time, we wouldn't have to do anything other than simply letting the cow's body and mouth execute their own actions whenever they wanted to because they would never have to communicate with each other at all. The problem arises because the cow's body and mouth should not be allowed to execute their own actions in parallel, and this is why we need to make sure that these two atoms are communicating with each other and making decisions on whether to carry out an action or not based upon their current state of mutual conversation.
Here is how an appropriate signaling scheme can be designed for the purpose of control in this example. The angry cow's body and mouth are both atoms, and the person and the grass are atoms as well. This means that every one of them is a signal transmitter, capable of emitting, receiving, and storing signals by means of moving them inside/outside of its own cellular membrane as well as temporarily keeping them in its receptors.
领英推荐
We all know that, according to the construct of this schema, the person will be emitting "person signals" from its current position and the grass will be emitting "grass signals" from its current position. The cow's body is sensitive to the person's presence, so it will be receiving and storing "person signals" as long as it is sufficiently close to the person. The cow's mouth, on the other hand, is sensitive to the grass's presence, so it will be receiving and storing "grass signals" as long as it is sufficiently close to the grass.
And the ensuing behavioral expectation can proceed like this: "If the majority of your receptors are filled with 'person signals', chase and attack the person. If the majority of your receptors are filled with 'grass signals', approach and eat the grass."
This interpretation alone, of course, is not sufficient to prevent concurrent execution of the cow's two mutually exclusive goals. As soon as the majority of the body's receptors are filled with "person signals" and the majority of the mouth's receptors are filled with "grass signals", what we will immediately witness is that the body's action and the mouth's action will both be triggered without any means of suppressing either one of them.
However, we ought to also realize that transmission of signals can be performed between any pair of atoms, not just between the person and the cow's body or between the grass and the cow's mouth. It can happen between the cow's body and mouth as well, by means of the cow's internal signal routes such as its nervous system. The body and mouth are directly connected with each other to indicate that they are components of one shared object called "cow", and it is fairly reasonable for us to assume that such a topological connection is a communication channel which allows direct transfer of signals from one end to the other.
Let us suppose that the cow's body not only receives "person signals" from the person but also sends copies of them to the cow's mouth through the channel, and that the cow's mouth not only receives "grass signals" from the grass but also sends copies of them to the cow's body through the channel. The overall logic can be summarized as:
"Whenever you receive a signal called X, make a copy of it called X1. If there is an available (empty) receptor, store X in it or destroy X otherwise. At the same time, send X1 to your connection."
If the atom had 2 connections, it'd be generating 2 copies and sending them to both of its respective connections, and so on. The general idea is that every atom inside a connected set of atoms (aka "object") stores signals from the external environment (as long as there are receptors available) and sends their replicas to its adjacent connections. This is the way in which each atom can "broadcast" its signals to the whole network.
One may claim that this network-oriented model violates the principle of "indirect communication" by letting atoms directly talk to one another without using any intermediate medium. Such a concern, however, will quickly dissolve as soon as we remind ourselves that a connection between two atoms can be interpreted as an intermediate medium itself. Whereas the person and the grass simply emit their own intrinsic signals (i.e. "person signals" and "grass signals") to the global space, the cow's body and mouth can be thought of as emitting copies of their received signals to a local space which represents the spatial volume occupied by the connection between these two atoms.
The end result of both radial and network-oriented means of signal propagation is that, at each moment in time, each atom will be possessing a fairly unique composition of signals within its inventory of receptors (given that there are enough number of receptors as well as signals that are being emitted/received, besides that the lifespan of each signal is not too long). Take the cow's body and mouth as an example. The cow's body receives "person signals" from the person in real time and broadcasts them to the cow's mouth in real time. Meanwhile, the cow's mouth receives "grass signals" from the grass in real time and broadcasts them to the cow's body in real time. This implies that both the influx of "person signals" and the influx of "grass signals" are actively completing with each other to occupy the majority the receptors in both the cow's body and the cow's mouth.
If the majority of receptors in both the cow's body and mouth get filled with "person signals", the cow's body will begin to execute its own act of chasing/attacking the person and the cow's mouth will be silent. If the majority of receptors in both the cow's body and mouth get filled with "grass signals", on the other hand, the cow's mouth will begin to execute its own act of eating the grass and the cow's body will be silent.
It is reasonable to suppose that there could be cases in which the cow's body has its receptors dominated by "person signals" while the cow's mouth has its receptors dominated by "grass signals", during which both of them will trigger their own actions and plunge the cow into an awkward inner conflict. Such a scenario, however, can be assumed to be highly improbable or at most only momentary because the cow's body and mouth are always actively sharing signals with each other. This creates an effect that is reminiscent of two adjacent heat-conducting materials reaching a thermal equilibrium due to the fact that thermal energy can easily flow between them. Just as two adjacent heat conductors will both be cold when the environment's temperature is low and both be hot when the environment's temperature is high (once the equilibrium is reached), we can reasonably expect the cow's body and mouth to be both dominated by "person signals" when the environment is predominantly occupied by the person's field of signal radiation or be both dominated by "grass signals" when the environment is predominantly occupied by the grass's field of signal radiation.
This concept of equilibrium can be useful when it comes to letting each object (i.e. network of atoms) exhibit only one of multiple possible behaviors instead of all of them at once. Since every component atom contains a finite number of receptors and every incoming signal can be shared across the whole network, it is only a matter of time until the object's whole "nervous system" gets saturated with exactly one type of signals and not others. And once this state of saturation becomes clearly recognizable, every atom within the same network can assure that it can act accordingly to the presence of the dominant signal without having to worry about contradicting the actions of other atoms.
If the entire connected set of atoms always share all types of signals with one another, however, what we will witness is that the object as a whole will always be bound to display one behavior at a time (which is not necessarily desirable). Let us recall from the example of the angry cow that there are goals which can definitely be carried out in parallel, aside from goals which are required to be disjoint in nature. The cow's body and mouth must have their behaviors synchronized, for instance, but the cow's body and milk do not have to because the cow can rotate itself for the purpose of chasing the person and dodging his/her breast-grabbing hand simultaneously.
Such a distinction can be realized by letting each atom either emit or receive certain types of signals in a highly discriminatory fashion.
The cow's body only receives external "person signals" and ignores external "grass signals" because it is only interested in the person and not the grass. The cow's mouth, on the other hand, only receives external "grass signals" and ignores external "person signals" because it is only interested in the grass and not the person. Such a filtering mechanism can also be applied to the process of internal networking. For example, we can choose not to allow the cow's body to send copies of its "person signals" to the cow's milk, thereby letting the milk keep acting based off of its own storage of "hand signals". Likewise, the cow's milk can be chosen not to send copies of its "hand signals" (which it receives from the person's hand) to the cow's body, thereby letting the body keep acting based upon its own storage of "person signals".
Such controlled emission/reception of signals is so robust, that this concept alone is capable of giving birth to myriads of sophisticated in-game mechanics. It is highly scalable because the design of individual atoms is still additively composable (That is, one does not have to explicitly specify relationships between atoms), as well as being mathematically minimal because the idea of emitting/receiving signals can easily be illustrated graphically rather than by means of recondite formulas.
I digressed a bit into the realm of technical details, but the overall purpose of the thought experiments conducted so far was to prove, at least on a theoretical level, the feasibility of constructing an intelligent large-scale system out of relatively simple yet emergent building blocks.
In the next volume, I will explain how this system of concurrent signal transmission will eventually merge itself with the overall architecture of gameplay.
(Will be continued in Volume 7)
Artist
1 年wondering how you decided on an angry cow as an example and whether they may continue chewing their cud while stampeding someone