While discussions of permissionless composability and interoperability are common in the Autonomous Worlds space, an overly complex virtual environment can create unnecessary barriers to achieving these goals. With this in mind, we created PixeLAW, a pixel-based Autonomous World that utilises a layer of programmable pixels to create an interoperable onchain canvas. Developed using Dojo, PixeLAW allows for the creation of native apps that can easily interact and access the same world state.
This emergent interaction is made possible by a base layer of programmable pixels – a set of immutable contracts that define the bare minimum components and fundamental systems necessary for programmability. In its essence, this base layer allows anyone to change the world permissionlessly by calling a set of systems rather than directly changing the underlying data models. This maintains the low-level digital physics of the world while giving inhabitants the freedom to build applications as they see fit.
Why pixels?
Pixels provide a good interaction space for visual programming due to their simplicity and granularity. Each pixel holds a discrete amount of information, allowing for precise manipulation within a digital space that is infinitely scalable and capable of evolving over time. They serve as a common language that enables interoperability across protocols and applications.
Classic use cases such as Conway's Game of Life have shown that given a set of low-level rules, the interaction of individual pixels allows for the emergence of new behaviours. Pixels combine into larger cellular automata which then disassemble and form new arrangements in a continuous cycle of life and death.
More recent examples, such as The Million Dollar Webpage or Reddit's r/Place, further demonstrate the power of collaborative emergence that pixels can enable. A coalition of Reddit communities even recreated an entire music video in r/Place last year, a feat that took three days of continuous coordination.
The pixel layer
Designed to be simple yet sturdy enough to set appropriate limits on the world, the programmable base layer can be divided into two components: the pixel data model and the core contract. The latter consists of a set of callable functions or actions that change a pixel’s state and manage permissions between applications.
The pixel model
The pixel layer is defined by the properties of each individual pixel. These set limitations on the extent to which the world can dynamically change and evolve. In practice, this means that any app or user can change the colour, owner, text (i.e. Unicode), and timestamp of a given pixel.
Below is a visualisation of the properties that a pixel can have:
![graph](/img/pixelaw1.png)
Core actions
To change the pixel properties, add an app to the world registry, or manage permissions with other apps, the developer simply calls the appropriate actions rather than directly changing the world’s data models.
For example, an app can call the update_pixel
action to update any of the user-changeable properties shown above. Additionally, an app can call the update_permission
action to manage permissions. For instance, one app might prevent another from changing the owner property of a pixel it occupies by setting Permission
for the owner property to false
.
What should stand out to you is that because the pixel properties are fixed, we can use the pixel as a composable entity across all apps within the world. This set of standards provides the digital physics for an interactive world, enabling applications to natively exchange information.
Applications
To prove this mechanic, we developed two separate apps within PixeLAW, namely Snake and Paint. Both onchain games were built to have their own unique gameplay while also interacting to change each other’s state.
The Snake app enables the player to create a snake object that moves autonomously in a specified direction, one pixel at a time. Once it encounters a pixel belonging to the Paint app, which enables players to colour individual pixels, the snake extends in size and calls a function in the Paint contract to cause the colour of the painted pixel to the default state. This interaction appears as an ever-extending snake that erases the coloured pixels placed by players.
With this initial proof-of-concept, we set out to engage external developers and enable them to build more complex interactions. While this initially resulted in more PixeLAW-native apps being developed, these apps were being built in isolation. Games such as Minesweeper or TicTacToe coexisted and individually contributed new gameplay and primitives (i.e. TicTacToe introduced AI behaviour) but were not designed to impact each other's state.
This changed during the Dojo Game Jam in December 2023, when a team recreated the popular game 2048 within PixeLAW. What started as a playful experiment soon allowed us to explore the broader possibilities that PixeLAW enables.
![graph](/img/pixelaw2.png)
In 2048, players slide numbered pixels on a 4x4 grid to combine pixels with the same numerical value. Each merge results in a new pixel with a doubled value, while each movement spawns a new pixel with the base value "2" within the grid. The team began to imagine how such a game could be played in tandem with an entirely different game in the same pixel-based world. One way they explored this was to enable the Snake app to interact and impact a running 2048 game by increasing the value of the numbered pixels it passed through. This created an interesting new game mechanic where players could use the interaction between the apps to advance their scores.
Extensions
One problem we have observed is that the current "looseness" of PixeLAW's world hinders developers from building congruent game experiences.
The sheer size of the world means that instances of games are too spread out to allow for congruent gameplay. When an interesting interaction between two separate apps does take place, other apps with inconsiderate or just unrelated designs have the potential to interrupt and block it.
On the one hand, we want to create a world that heavily emphasises composability and cross-app interoperability. On the other hand, this has the potential to lead to a messy, incongruent, and unenjoyable player experience.
To strike the right balance between chaos and order and allow PixeLAW to produce innovative yet engaging experiences, we plan to introduce "areas" into the world. These dedicated spaces allow builders to reserve specific zones within the pixel grid for designing and developing customised gameplay. This approach also introduces the possibility of having entirely different clients for different areas inside PixeLAW.
While this feature might seem to contradict the idea of full interoperability, we believe that it is essential to first populate a world with distinctive and memorable experiences. Local pockets of friction can increase the openness of the world as a whole. Meanwhile, PixeLAW will retain its characteristic messiness beyond these assigned areas.