How to Play

Time Trials will be available on Steam for Windows May 17 2024. Store Link.

Preview

About

Time Trials is a time travel based puzzle game in which the player must use time travel to complete a series of increasingly challenging levels. While the overall concept is simple, the challenge comes from the fact that the game enforces paradox free time travel meaning that your actions in the past are limited by observations in the future.

Development

Time Trials is made using Unity, which is the go to program for most small scale game development. As someone who developed flash games, Unity, seems like the best replacement for Adobe Flash player, even though it does not make browser based games. Development started in 2021 during the pandemic as I (and a lot of people) had quite a bit of free time. At that point I had taken nearly a decade long break from game development and wanted to make something to really challenge myself.

Programming

The logic is written in C# which is the programming language native to Unity. The core game logic and display logic are fundamentally separated as the game needs to be able to consider hypothetical turns.

Art

Art for the game originally made using GIMP, but I switched over to LibreSprite as it better suits the type of art style of the game and supports animations.

Music

Music was made using FL Studio. This game has some of the very first pieces of music I have ever written! The music actually gets more complex with each version of the player added to the level.

Design Philosophy

Time trials falls squarely into the fixed timeline type of time travel. For an explanation of what I consider the different types of time travel, go here. I don't quite like the idea of multiverses/alternate timelines since you're really just running away from your problems instead of actually solving them. Even if the timeline you're in looks just like the one you left, you've basically abandoned a whole timeline full of people. Way to go Avengers. A dynamic timeline like Back to the Future is a pretty loosely defined problem. What kind of paradoxes do you allow? How do changes in the past propagate to the future especially those that would cause a paradox maybe even preventing the change from being made in the first place? There is probably is a game to made with this type of time travel, but this isn't the game.

No Paradoxes

A paradox does not cause a game over a screen, a paradox simply cannot happen. Compare this to a standard FPS game. You can lose all your health and die, however, you cannot walk through a wall. Avoiding paradoxes is built into the core game mechanics. The game will prevent you from taking actions or even force a self destruct to prevent a paradox from happening.

This being said, no one is perfect and Time Trials does contain code for when an unresolved paradox is reached. It just triggers a game over.

No Forced Player Actions

In many media involving fixed timeline, the protagonist often sees their future self taking some action sometimes even before they know time travel is possible. While a cool "wow" moment, in a video game, this would actually require us to force the player to take action at some point. Since taking agency away from a player is usually uncool, Time Trials never forces actions, only prevents certain actions. The one exception is the self-destruct action to prevent an otherwise unavoidable paradox.

The in-game explanation for this behavior is that the mech the player pilots prevents such actions. The only reason one is able to travel back in time is because they are controlling a vehicle that will not allow paradoxes to happen.

How it Works

Time Traveling

On the surface, traveling to past turns looks similar to a replay system. Simply set the state to the memorized state of turn x. However, this doesn't allow the player to actually affect the future with their actions, as events are set in stone with a replay system.

Instead, all player actions are recorded and then used to rebuild the state at any turn. All NPCs in the game are deterministic meaning that they will always behave the same way given the same situation. The only thing that can change the events of a turn is the player taking an action. Once a past turn has been rebuilt, set the game state to that past turn, add the player's avatar and voila, time travel.

Now, player actions in the past will affect the future as those actions will be used to construct state in the future. For a significant optimization, the game actually does keep memorized states of past turns rather than doing a full rebuild every time. These states become incorrect when an action is taken in a turn. Once an action is taken, all future states need to be rebuilt taking that action into account.

Limiting Player Observations

If the player was able to see the entire level, time travel to any visited turn would be impossible as the player would have seen a turn where no future self shows up. In order to allow players to travel to past turns, players can only see a certain distance from themselves. Additionally, certain elements such as walls or smoke block the player's view. It is on the unobserved tiles that future versions of the player will be able to travel to as the player has not observed them to be empty. 

While events may appear to happen outside of player view, these are only guesses as to what will happen should no actions be taken.

Detecting Paradoxes

In Time Trials, a paradox is defined as an event happening differently than what the player originally observed. Everything in the game from NPCs to projectiles has some state that can be observed. When a player takes an action or when something happens in between player turns, the states of all the tiles that the player can see are recorded as observations.

When a player takes any action in the past, the game only considers that as a potential action. To determine if it is a valid action, it rebuilds every future turn and checks to see if the observations with the potential action match the original observations. If any observation is found to not match, then a paradox has been found.

This would have a state like "Melee_Enemy, Facing_down"

Preventing Paradoxes

Since the game detects paradoxes before any player action becomes permanent, player actions that would cause a paradox are simply rejected. However, paradoxes can still happen with only this method. If a player was to travel to a location that had previously been observed to be empty and wait there, there would eventually be a paradox. Since Time Trials doesn't force player actions we cannot move the player out of the way, and there is not guarantee that it would be possible to avoid a paradox with some set of actions. The player's avatar will self-destruct before its observation can create a paradox. By forcing a self-destruct in some cases and preventing paradox causing actions, no paradoxes can arise during gameplay.

The Impending Paradox

An impending paradox is created when a player takes an action that will cause a paradox unless another action is taken in the future. On example is seeing a switch in the on position and going back in time an throwing it to the off position. You could switch it back on an avoid the paradox, but if you take no action, a paradox will occur.

At the moment, Time Trials solves this edge case by simply disallowing impending paradoxes, but future versions of the game may allow this behavior and somehow prevent it from causing paradoxes.