?



Architecting Physics
Authors
bytes
Published
Theme
Digital Physics

As creators of virtual worlds, our goal is to create environments that are engaging and interesting for users. This means finding a balance between designing a digital physics that allows for complex and unexpected behaviors to emerge, and ensuring that the available infrastructure can support these behaviors. To do this, we must consider three main dimensions of digital physics: time, the form of its laws, and the scope within which these laws apply.

We refer to the passing of time in a virtual world as the iterative application of the world's laws upon itself. Each discrete application is an "instant" within the world's flow of time. One way to design in-world time is to have it progress continuously alongside external time. In a virtual world implemented on a blockchain, each block corresponds to a certain number of instants passing within the world, regardless of the transactions contained in the block. This is known as "synced" time. This approach can make the world more interesting for users as it allows them to see the consequences of their actions unfold in real time. Additionally, it leads to more time passing within the world, with the world continuously updating, which in turn facilitates the emergence of interesting behaviors.

However, there are drawbacks to this approach. A larger expanse of time generally requires more computational resources, which can quickly surpass the capacity of a chain or server. It can also be difficult to implement this system on a regular blockchain, as all onchain changes must be initiated by transactions from external users.

The alternative to synced time is unsynced time. Under this scheme, the passage of time in the world does not necessarily advance when external time does. Instead, time moves forward in response to certain events, usually user actions. Traditional board games that don't involve a timer would fall into a similar category. Unsynced time is easier to implement onchain, as it fits the model that blockchains were designed to support. However, it also sacrifices some of the features that could make the world more interesting.

Worldbuilders must also decide whether the mathematical laws governing their virtual world will follow open- or closed-form expressions. Closed-form expressions have a fixed number of operations. With open-form (or recursive) expressions, however, the number of operations grows depending on a given variable. Under open-form expressions, the future state of the world can only be calculated by repeatedly applying the laws of the world to a known state. Complex, live environments, such as Dwarf Fortress, usually fall into this category. Closed-form expressions, on the other hand, allow for any future state in a constant amount of time to be calculated from a past state and the time that has elapsed between them (assuming no future user actions alter the state), like pieces falling down in a game of Tetris.

Open-form expressions can make a virtual world more interesting because, like the real world, they are finitely predictable. It takes increasing amounts of time and computational resources to predict the future state of the world. Furthermore, unexpected macroscopic behaviors can emerge from simple microscopic interactions. In a world governed by closed-form expressions, these emergent behaviors generally occur only externally, through the actions of users (who themselves behave like open-form expressions), rather than within the physics of the world itself.

This trade-off between open- and closed-form expressions involves a similar balance as time. Closed-form expressions may decrease the potential interestingness of the world, but they also make it more computationally efficient. Closed-form expressions can be used with either synced or unsynced time. When implemented on a blockchain, they have a significant advantage over open-form expressions when time is synced. Because the cost of any length of time is constant, the world can be designed so that the onchain state is only updated when a user sends a transaction, but it is set to the state it would have been in after the time since the last update had elapsed.

In the real world, time passes everywhere, all at once, in a potentially infinite universe (with some relativistic intricacies). In virtual worlds, this is not necessarily the case.

First, the virtual world may be noticeably finite. The potential for interestingness tends to increase with size – more happens in a world made of two billion galaxies than in a world made of two atoms — but so does the computational cost. Both of these relationships are closely tied to the two trade-offs previously mentioned: the passage of time and the form of physics.

Second, time does not have to pass everywhere within the virtual world. The world can be divided into discrete regions where time passes differently, in order to reduce the computational burden of the world. For example, more sophisticated and expensive physics can be used in regions where there is user activity, while simpler physics can be used in areas where there is no activity. The downside of this approach is twofold: it can make the world seem inconsistent and lacking integrity, which limits the design space for the laws of the world and puts a burden on worldbuilders to avoid confusing users; and it also puts limits on how causality can travel within a world, as actions in one area cannot have consequences in a distant area if the space between them is frozen in time. The size of the regions where the physics apply is a major design consideration that will impact the resources needed for the world and the level of interestingness it can achieve.

To create an interesting and engaging virtual world, it is necessary to carefully balance computational efficiency with interestingness. This includes deciding on the type of time to use (synced or unsynced) and evaluating the form of the physics laws that will govern the world. The size of the regions wherein the physics apply is another important decision. By making these choices carefully, not only can worldbuilders achieve interestingness while keeping the computational burden of the world manageable, they can also create a highly fertile creative substrate for other developers to build on top of.


Acknowledgements

The piece builds on ideas first developed in an earlier text written by bytes, cha0sg0d, and yonada.

This text was originally published in Autonomous Worlds N1, 2023.