#### *~lsankar, nibnalin, phated*
In [dark forest](https://zkga.me/), players don’t know other player locations unless they’ve mined them. The amount of work to mine an entire map is fixed and finite. There’s always *some* amount of finite capital that could allow a player to mine the entire map in a small amount of time.
Everyone knows this.
In [afterimage](https://github.com/phated/afterimage/), the past behaves in a similar way, but the future is un-mineable. The commitment associated with a game action commits to the latest block hash (a pseudorandom number in a giant field) alongside the player's state. It’s impossible to guess block hashes from the future, thus it’s impossible to mine the future, with any amount of capital.
What follows is a romanticized exploration of this game mechanic, and of decentralised multiplayer games in general.
Alternative title, *timeless*.
## How can we create interesting multiplayer games?
Games, and especially decentralised games, are extremely powerful instruments to study [Darwinian linguistics](https://en.wikipedia.org/wiki/Evolutionary_linguistics). What makes multiplayer games exciting are the natural social interactions that stem from a base "world" - the *language* between the players that the game coaxes into existence. For instance, compare Minecraft with DayZ: when meeting new people, players never stand still in DayZ for the fear of getting shot and reset to the beginning - creating somehow tense and terse communication, whereas Minecraft's more forgiving death mechanic yields a much more friendly *language*. Both games are really just very similar wrappers on a very similar physics engine, but the tensions, the communication barriers, and the perceptions of the players act wildly differently -- there is a distinct language between each set of players.[^1][^2]
This observation yields an interesting mechanism to generate good games -- think about the underlying properties of the languages we speak, what distinguishes them from each other and what parts are unsaid or ignored.
# What if clocks didn't exist?
Let's think about a gadget all real-world languages seem to have adopted - clocks. The way we communicate in real life is deeply connected with clocks. If a coworker doesn't respond to my Slack at 1:30 PM, my most reasonable guess would be that they're eating lunch, and I would assume they'll be back in office in an hour or two.[^4]
[^4]: For the sake of completeness, this time is in their timezone or planet or whatever other conditions they may be in.
*Time* is extremely reliable, and by transfer, the lockstep synchrony of clocks is very reliable. Humans have discovered this clock gadget that allows them to perform a transformation of the certainty of time to certainty of position and actions (albeit one that is lossy) - Nalin is probably going to walk into the office around 10AM.[^5] And of course, this means this mutation of certainty has untenably leaked into the *languages* and *cultures* we communicate with.
[^5]: Unless he degens and subverts all societal expectations on him.
You can already see where I'm going: What if we create a world that intentionally destroys the certainty imbued by time and disincentivizes creation of language that uses clock-like gadgets?
How can we do that practically? It is perhaps simplest to work in this new world by attempting to replace real world time. Let's call real world time "certain time" and come up with a new version of time for our world -- call it **uncertain time**. What are the properties this "uncertain time" needs to have?
Uncertain time still needs to flow linearly, otherwise people will just have the ability to float time back and forth when conditions don't favour them. This implies that "uncertain time" still needs to be binding to the past in some way.
But there are no such restrictions on the future. In fact, we *want* clocks of different people to be constantly out of sync. For one person's future time to be impervious to a third party's perception. For my future actions to have a high degree of unpredictability to an outsider. For the purposes of games also, we want some knob on this unpredicability such that we will create information asymmetry and incomplete information games.
How will we create an "uncertain time" with such properties? Luckily, we already have it done for us - blockhashes. We can use blockhashes as a tether to bind to for past clock actions, but their ~infinite existence space (2^256 possibilities) makes them impossible for individual agents to predict for future time.
How do we instantiate these ephemeral commitments more concretely? Let's start with imbuing this uncertainty into positions of a player over time (since space $\leftrightarrow$ time conversions are somehow the most natural). Let's say our hero player has a location. He provably _binds_ to this location for others to see using an interesting new form of commitment: (coordinates, blockhash) where the blockhash must be the just previous blockhash[^6]. This binds the hero to their past, but blurs the view of outsiders into this player's location, who need to brute force to gain certainty on the hero's position. The hero moves, changing the blockhash with their new location and authenticating their changed commitments via a zero-knowledge proof. Other players lose almost all track of the hero's location, and need to start searching for the hero from scratch, brute-forcing hashes. And therefore, this commitment yields all the necessary properties we asked for - a past-binding location over time with the uncertainty of location to outside viewers.
[^6]: For practical reasons related to how chain mining works, we technically need to allow random selection of the blockhash from one of last, say, 256 blockhashes, but this is an orthogonal detail vs. the main idea. Seperately, to finetune the difficulty of reversing this hash, you would likely also add a salt over whose space others have to brute force over.
What makes this useful as a base game mechanic? For starters, in a multiplayer setting, search strategies themselves will create interesting information asymmetry. You have essentially added one more dimension to DarkForest's mining, but this dimension is only searchable backward in time. Some players can choose to search for other players close to them who have moved recently. But then others might choose to burrow for a long time and then suddenly appear to shock enemies, so the next level of iterated dominance some will adopt strategies that search through blockhashes way back in time and in totality, this yields a differential, imperfect games. Even by itself, this is sufficient to create a game like [generals.io](https://generals.io/) which is already quite interesting (and as far as I am aware, not doable without this setup).
But generals.io is only scratching the surface. We can do more -- Games hide in the crevices of information assymetry, so another natural way to create game mechanics from this language is to explore the latent space between our new language gadget (uncertain time) and certain time (and by extension, the time certainty imbued by it onto position and other actions). Here's two ways you can practically do this:
**Beacons**: Create beacons that allow you to gain "power" in exchange for giving up the uncertainty of your position. You can claim this treasure chest if and only if you broadcast your location to everyone with full certainty.
**Power waves**: One way to interact with certain time is to make a player attribute, such as power, dependent on certain time. Then, if battles occur when players are in proximity of each other but their positions are uncertain (and so is the distance between them), you have interesting tension to hedge your bets and space for incomplete information games.[^7]
<img center src="https://i.imgur.com/6PlHZVr.png" height="600">
*afterimage: beacons, shadows and power waves*
[^7]: Incidentally, this also resolves one core tension in blockchain games: Openness of data makes it quite hard to have indeterministic/incomplete information battles. With our uncertain time however, we can make uncertain battles.
These two interactions work very cleanly together, in fact, and yield the entirety of the construction of [afterimage](https://github.com/phated/afterimage).
But this is still just scratching the surface: Uncertainty of time/clock can be transformed into uncertainty of actions beyond just positions. We can have an $E = MC^2$ style transformation for _any_ game element. For instance, semi-private inventories can now exist as a function of these commitments - your sword, your arrows and your spear can go through position mutations previously described, and you can bring uncertainty to your hero's bag for other players and have battles with indeterministic results.[^8]
[^8]: Throw in off-chain recursive SNARK based plasma channels for maximum experimentation: https://hackmd.io/@nibnalin/S1hYoZ35q#fn1
Of course, these mechanics are just seeds for creation of space that incentivizes a very particular kind of *new* language. Whether this flourishes into an interesting new language is up to the modders who implement multitudes of search strategies, or to the hardcore players who discover unique social strategies and cultures.
# Appendix: A thought experiment
On self-reflection, it seems worth noting that the seeds of these thoughts were originally planted in my head by [When Cultures Collide](https://www.amazon.com/When-Cultures-Collide-3rd-Leading/dp/1904838022)'s (don't read it, its not a good book) description of how different peoples respect time differently - americans typically treat time unilaterally but other cultures may have a very multithreaded conception of time - juggling many passions/clock cycles simultaneously.
Seperately, the idea of afterimage's commitment scheme came to me while drafting a short story for school. The topic of the short story is also quite interesting to think about (especially wrt. games): Humans, without pen and paper, have a pretty limited RAM. In particular, here's a thought experiment that demonstrates this limit: I can think about the laptop on the table, I can think about thinking about the laptop on the table, and I can maybe even think about thinking about thinking about the laptop on the table, but that already reaches the stretch of my perceptions. Add another layer and my brain stops being able to compute this altogether. This limited recursion depth is especially relevant when you think about game theoretic ideas of [Rationalizability](https://en.wikipedia.org/wiki/Rationalizability) and [common knowledge/dominated strategies](https://en.wikipedia.org/wiki/Common_knowledge) -- most humans are just not particularly good at analysing rationalisable strategies in real-time (and we don't train for it in school). I think there may be an interesting game/story in the interweavings of this observation, particularly if alien species lacking such limits are somehow involved.
Of course, these ideas (and afterimage itself) are consolidation of thoughts and joint work from [Blaine](https://github.com/phated) and [Lakshman](https://github.com/lsankar4033).
[^1]: Perhaps this points to the particularity of why [exgrasia](https://exgrasia.xyz) has no health bars or conflicts by default - I intended for it to be an experiment in language creation particularly distinct from existing ones.
[^2]: This idea is perhaps most simply captured by a quote from a particularly famous Ted Chiang story: "...Let's say that I taught them Chess instead of English. Every conversation would be a game. Every idea expressed through opposition, victory, defeat. You see the problem?..."