I wanted to create a time-travel game for some time, but I couldn't decide which one. The reason was that I wanted a game with “realistic” time-travel and that is not so easy to make. Then one day, it occured to me that Sokoban 1 Don't know what Sokoban is? Just play the first floor of Timelike. Summary: it's a computer puzzle game where you move your character on a grid, push boxes and your goal is to push them on target tiles. could be an option and I started working on Timelike – Sokoban with realistic time-travel. But what does realistic time-travel mean? How does Timelike work and can one make another time-travel game like this? This guide is to answer these questions. So if you are interseted, look no further and keep reading.
The guide is designed as an exhaustive read, so don't hesitate to skip that aren't interesting to you. For example, if you only want to know something about the rules of Timelike, you can skip to section Player Paradoxes, which should mostly be comprehensible by itself.
First, what does realistic time-travel mean? To get there, you have to ask yourself a basic question when you are implementing time-travel for a game: how can time-travel even work?
The problem with time-travel is that not only we haven't discovered it but there is actually a reason why it shouldn't be possible. It is known as “grandfather paradox”.
Imagine I get a time machine, I travel to the time when my grandfather was young and I kill him. Then my grandfather never meets my grandmother, so one of my parents is never born, so I am never born, so I can't travel in time to kill my grandfather, so he stays alive, so I was in fact born, I travel in time, kill him and so on... 2 Yes, I don't actually need to kill my grandfather, any way I stop myself from traveling in time works.
Neither possibility works. If I travel in time, I cause myself not to travel in time, and vice versa. This is grandfather paradox.
An easy way to create a time-travel game is to allow paradoxes. In a time-travel version of Sokoban called creatively “Block Pushing Puzzle Game But You Can Time Travel” 3 https://versificator.itch.io/block-pushing-puzzle-game-but-you-can-time-travel, you simply lose when you cause a paradox. But can we do better? Can we have time-travel without paradoxes? There is a way, and not only one.
One of ways time-travel could avoid paradoxes are “parallel universes” (also called parallel timelines, multiple histories and likely other names). In this model, when I travel in time, I arrive in a new universe. This new universe is the same as the original one up to the moment I arrive, but then it evolves independently.
When I kill my grandfather in the new universe, it doesn't cause a paradox: while I am never born in the new universe, my grandfather and I are unaffected in the original universe, and I can still travel in time. Paradox solved.
A time-travel version of Sokoban called “Executioner's insomnia” 4 https://gamaverse.com/executioners-insomnia-game/ uses this model of time-travel. When you go to a time machine, you get back to the beginning of the level and you can co-operate with your past self to complete the level in the new universe.
Can we do better than parallel universes? You might think there is no “better” because parallel universes already work without paradoxes. However, they aren't the nicest model due to a problem we call inconsistency. That's why I didn't use it in Timelike.
Let's recall my time-travel adventure of killing my grandfather, only this time we won't take my point of view, but the point of view of other people, who didn't travel in time. People in the original universe see these events:
They witness me depart to the past, but I never arrive. It's just as if I board my time machine and disappear. On the other hand, people in the new universe see these events:
Here they witness me arrive from the future, but I never depart. It's just as if I randomly appear. People who don't travel in time can't make sense of my time-travel adventure. How come I depart and don't arrive? Or don't depart and arrive? If such a thing happens in a universe, we call the unvierse “inconsistent”. Can we do better and have time-travel with consistent universes? I would argue that we can.
We want time-travel with consistent universes. To restate it as a principle: if someone (or something) departs to the past, they must arrive in the past, and if someone arrives in the past, they must depart to the past eventually.
The simplest way would be to have just one universe a require it to be consistent. Now you might be thinking: “Yes, we would love to, but that's exactly what we tried at the beginning, and you could cause grandfather paradox.” But what it you just couldn't?
This model allows just one universe, but if you try to cause a paradox, you will find that you just can't – that's the principle. Something will stop you. In case of grandfather paradox, it might be that I travel in time to kill my grandfather, but then I am run over by a car before I manage to kill him. Of course, I could take special care not to be run over by a car. Still, something else could happen to me. The principle is based on a bold hypothesis that there is always such an accident that I didn't account for, and this accident always saves the universe from a paradox.
In fact, the principle allows even wilder possiblities. Maybe I travel in time to kill my grandfather, but I accidentally kill a burglar who was about to kill him. This way I save my grandfather's life, and, as a consequence, I cause my own birth! Or maybe I attempt to kill my grandfather, but he survives keeping a traumatic memory which later makes him behave badly towards me, which is why I decide to travel in time and kill him. So I cause my own time-travel.
Such a loop is almost the opposite of a paradox, as it's an event that causes itself to happen, while a paradox is an event that causes itself not to happen. Self-caused events like these are one of the coolest things this model has to offer.
Is there something yet cooler? Possbily this: imagine I lose a hat while I'm trying to kill my grandfather. He survives, keeps the hat, later gives it to me, and then I wear it when I travel in time to kill him. What is the hat's origin? There is no origin; I get it from my grandfather and he gets it from me. Its past is the same as its future, its history is looped. We can call it an “object with loop history”. Could this be possible? There could be some entropy concerns, but it's not paradoxical, and you can in fact see such an object in Timelike (see section Box Paradoxes (not written yet))
Though it would be cool, you might still be in doubt whteher it's all actually plausible, whether there is always such an accident that prevents a paradox. Physicist were also in doubt, so they devised thought experiments to check. This section is a digression to introduce one such experiment.
People are too complicated for physicists, so they didn't think about people killing their own grandfather, but rather about billiard balls. Consider a billiard table with two portals like this: (viewed from above)
They used portals for time-travel rather than a time machine, just as we did in Timelike. The portals act as a passive time-machine for the ball. If a ball goes into the portal labeled “−2s”, it comes out of the other portal two seconds earlier (two seconds before it went in). We discuss portals in detail in section Portals. The idea was to roll the ball with the right speed so that it rolls into the portal and arrives in the past precisely on time to hit its past self and deflect itself from the portal, causing a paradox.
But they figured out that there is an “accident” that can prevent the paradox: the ball comes out of the portal earlier than expected and at a unexpected angle, hence it hits its past self almost from the back, so the past self accelerates and is deflected only slightly. Then it doesn't miss the portal, but instead goes in earlier and at a different angle, thus exactly matching the time and angle of the outgoing ball and creating a consistent and paradox-free universe.
Physicists have been unable to find a set-up (for balls) that inevitably causes a paradox. There was always a possible accident, which suggests that this self-consistency principle could work, perhaps even for me and my grandfather. 5 F. Echeverria, G. Klinkhammer, and K. S. Thorne: Billiard balls in wormhole spacetimes with closed timelike curves: Classical theory, https://link.aps.org/doi/10.1103/PhysRevD.44.1077
By the way, these thought experiments originally inspired me to make a time-travel billiard game, but I haven't figured out how to make it. I encourage you or anyone to try and if you do, please write me, I would be very interseted in the result.
It's worth pointing out that the past cannot be changed under this self-consistency principle. In short, it's because there's only one universe, only one timeline, in which anything either happens or not, but changing it would require a new timeline. Of course, after reading this, you might ask: “what's the point of time-travel, then?”
The fact that you can't change history doesn't mean you can't affect it. If I accidentally save my grandfather's life, it definitely affected a lot, even though it changed nothing (my grandfather must have stayed alive for me to be born). I can do stuff in the past, the point is that all the stuff has been done (by my future self) before I depart to the past, so I change nothing. 6 “I can do stuff in the past, but it has already been done, because it's the past.” – explaining the self-consistency principle sometimes feels like repeating the obvious, it just doesn't get into ones head so quickly.
You can use this to invent a new paradox variant. If all has been done in the past, why travel to the past and actually do it? As an example, assume for a while that I don't hate my grandfather, and I want to travel to the past to give hime some useful advice. My grandfather tells me that he's met me in the past and I have given him the advice. So I could travel to the past and give him the advice, but why bother if he's got the advice and history can't be changed? So I decide not to travel, but then he couldn't have got advice in the past, so I decide to travel and so on.
There are these accidents of course. An accident would have to stop me from traveling in time, which is believable, or force me to travel in time, which is less believable. Hence, it seems more likely that I never actually travel in time.
Another, perhaps more believable explanation why I might want to travel in time, is that I might not know that my grandfather got the advice. Knowledge of the past apparently harms the self-consistency principle; it functionality may somehow depend on the lack of knowledge. If I don't know the past, I can still imagine I'm changing it. 7 Those who don't know the past are condemned to travel there.
There are books and movies that use self-consistent time-travel and explore how it might work with people. An example is “Harry Potter and the Prisoner of Azkaban”, mainly the 2004 film; the book seems unclear to me, while the film makes it very clear that the self-consistency principle is used. 8 Sadly, the play “Harry Potter and the Cursed Child” uses parallel universes. You can observe how lack of knowledge drives the characters to the past.
Unfortunately, it's not possible to make a version of Sokoban employing this self-consistency principle. The fact that past cannot be changed makes it unsuitable – if you traveled to the past, the computer would have to know it in advance, because all moves you would make in the past would have to have been made before.
Still, this self-consistency principle is so fascinating that I wanted to get as close to it as possible. The resulting model we use in Timelike is a compromise that we can call the “self-consistency principle with multiple universes”.
This is the model of time-travel that is used in Timelike. It is basically a cross between the self-consistency principle with one universe and parallel universes. History can be changed, or in other words, you can get to a different unvierse, but every universe is self-consistent. Grandfather paradox is, therefore, still a problem to be solved, because I must depart to the past even in the new universe to preserve self-consistency. The way it is solved in Timelike is discussed in section Player Paradoxes and on.
There's one additional feature in this model: you can get to a different universe (or change the past) even when you don't travel in time. Suppose for example that I know a man who will become the grandfather of a girl called Alice. Later, Alice will travel in time to meet her young grandfather and me. If I kill her grandfather at the moment, Alice disappears because she is never born. So I get to a universe without Alice, although I haven't traveled in time. It is enough that somenone else has traveled in time.
You can get to a different universe in a similar manner in Timelike. That's why you sometimes see weird things like a box appear or disappear on a tile, or a box which suddenly becomes your player character. You have just got to a universe in which there's a box on the tile (or isn't), or in which there's a player on the tile where a box was in the previous universe.
We won't discuss the question of paradoxes in this model in general, but only for the special case of Sokoban. The idea is to create a version of Sokoban with time-travel such that no matter what moves you make, you find yourself in a universe
And we succeeded! Except for bugs and that the implemenation is not completely translated from idea to computer yet (see section Implementation (not written yet)), which is to be fixed (hopefully) by the end of 2025.
Now even before you read anything about how it works, you can open any time-travel room in Timelike (second floor and above) and check. Whatever moves you make (if they are allowed, e.g. not into a wall), you can always watch a replay of the universe you are currently in and check that it's self-consistent. For example, if a box went to a −5 portal between times 8 and 9, it should have come out of its twin portal between times 3 and 4 (see the next section about how portals work). Try it!
In Timelike, you travel in time using portals rather a time machine, which might be surprising. Besides teleportation in space, the portals can teleport you in time. How does it work? There's always a pair of portals labeled, say, “+5” and “−5”. If you go into the −5 portal, you come out of the +5 portal, but 5 turns earlier. This way, you traveled 5 turns to the past.
You can also travel to the future. If you go into the +5 portal, you come out of the −5 portal 5 turns later. This is obviously not as interesting, as it's perfectly natural to go in now and come out later. You could as well wait in the portal for 5 turns.
Since you can pass the portal both ways, we can simply say that the portal connects the two tiles. But it connects them across time: it connects one tile at a certain time to the other tile at a time 5 earlier. It's as if the two tiles at different times were next to each other and the portals were just a normal passage between them.
Since the portals work like a normal passage (with a time shift), anything that can move between two neighbouring tiles should be able to move through a portal. And that's why boxes can move through portals in Timelike, a mechanic which adds new gameplay, but also new paradox possiblities which we discuss in section Box Paradoxes (not written yet).
Why do we use portals for time-travel and not time machines in Timelike? It is again an attempt at realism. If we stick to the self-consistency principle, physicists have ideas what time-travel could be like if it worked. And a portal fits modern physics more than a machine. Physicists would actually call it a “wormhole”, which is basically just general-relativity-speak for “portal”, because a wormhole is a hypothetical twist of spacetime that connects otherwise distant places. And there is a cool hypothetical mechnism how a wormhole that enables traveling in space could be transformed to a wormhole that enables traveling in time. 9 Wikipedia: https://en.wikipedia.org/w/index.php?title=Time_travel&oldid=1301730312#Wormholes, or M. S. Morris, K. S. Thorne, and U. Yurtsever: Wormholes, Time Machines, and the Weak Energy Condition, https://link.aps.org/doi/10.1103/PhysRevLett.61.1446 In our game universe, the Timelike company has actually done it, so this is how you can travel in time and this is why it's portals and not time machines.
Let's return to the question of paradoxes. We said that there can be paradoxes in the model of time-travel we use (the self-consistency principle with multiple universes). There reason you can't cause a paradox in Timelike is that we implemented rules to prevent it. In this section we begin to discuss what rules they are and why we had to implement them like this.
When we refer to the character in Sokoban who moves and pushes boxes, we usually write “you”, or, when you travel in time, “your past self” and similar. Occasionaly we write “player” when “you” is unsuitable, such as in this section's title. The player is you.
In this section, we look at the analogy of grandfather paradox. If you wanted to cause grandfather paradox in Timelike, you would go into a portal to the past and stop your past self from going into the portal. Then you didn't go to the past, so you couldn't have stopped yourself and so on. We call this “player paradox”.
There are multiple ways you could stop your past self from going to the portal in Timelike. For example, you could stand in the way of your past self. Your past self then can't get to the portal, because they can't pass through the tile you occupy. This blockade would cause a paradox, so we had to make it impossible. 10 It is possible in Executioner's Insomnia. Hence we implemented this rule: in case your past self goes to a tile where you are standing, your past self is stronger and simply pushes you off the tile, as if you were a box.
What if there's a wall so there's no tile you could be pushed to? Could that cause a paradox? No, you are simply crushed between your past self and the wall and lose 11 Yes, you can lose in Timelike, in case you didn't know.. So you can't block your past self in this case either.
You can't push two boxes in a row in original Sokoban. You can thus push two boxes into the way of you past self. Then your past self couldn't pass, because it would require pushing two boxes in a row, then couldn't get to the portal, and we have a paradox. Like before, this blockade mustn't be possible, so the rule is: you 12 Your past self, but also your present self, because it doesn't make sense to make a difference here. can push two (or more) boxes in a row in Timelike. 13 Even infinitely many, see section Implementation (not written yet)
And like before, if there's a wall behind the box (or boxes), it doesn't block your past self. Instead, one of the boxes is crushed at the wall.
Finally, if you can't passively block your past self, you might try to actively push your past self away from the portal. So you might move onto the tile where your past self is standing. What happens? It is simple, you can't move there at all. It's a forbidden move; the game won't allow you to move to a tile where your past self is standing.
When you are in the past, you move simultaneously with your past self. So it could also happen that both you and your past self are moving to the same tile at the same time. Again, your past self has priority and your move is forbidden.
However, when you are moving to a tile with your past self, and your past self isn't standing there, but leaving the tile at the same time, there's no reason to forbid the move, so it is allowed. It works the other way as well: you can leave just while your past self is moving to your tile.
A fun fact is that the situation where you and your past self move against each other is also not a problem. You could just exchange places, no paradox. It seems weird though, so it is not allowed.
By the way, when we claim Timelike has a paradox-free time-travel, we imply that you can make any moves you want and it won't cause a paradox. Strictly speaking this is a lie, because of forbidden moves. Imagine we had a time-travel game with paradoxes, and we simply forbid all moves which cause a paradox. Then it wouldn't be fair to call it paradox-free. The difference is that, in such a game, you would eventually try to make an absolutely regular-looking move which causes a paradox in a complicated way, and then you would complain that the game doesn't allow regular moves. On the other hand, in Timelike, it is quite intuitive that you can't make moves that make you crash into your past self. 14 Although sometimes the past self is hidden in a portal and it's not immeadiately obvious why you can't make the move. But it's only about intuitiveness.
If you look at the rules we have so far, you see that we've made it so you can't stop your past self in any way. Not only are you unable to stop your past self from going into the portal, you are unable to change any of your past moves (it's kind of logical). When your past self moves to a tile, you can't prevent it. When your past self stands still, you can't prevent it. Your past self moves around like a god, with absolute priority. So with these rules, you certainly can't stop your past self from going into the portal, and you can't cause player paradox.
There's still room for another kind of paradox, which we discuss in section Box Paradoxes (not written yet). There's one more thing to discuss here: if you travel to the past twice, you can meet two of your past selves.
To be completed...