Replay
Last updated: 9 Nov 2026
A replay plays a finished game again, exactly as it happened. The server stores multiplayer games automatically. Every game can also be watched from its replay data, a text that contains the whole game.
1. Stored multiplayer games
- The server stores the multiplayer games that start in the lobby. Single player games are not stored on the server.
- Every stored game has a replay ID: 6 characters from
a–z,A–Z,0–9,_and-. - In a 1v1 game with several pairs, every pair has its own replay ID.
- About 3 seconds after the end of a game, the game shows the message "This game will be stored here: territorial.io/log/?r=<ID>" in the bottom right corner.
- A replay is stored only if it is not larger than 256 KB. Very long games with very many actions can therefore be missing.
- The server keeps a limited number of replays. New replays overwrite the oldest replays. A replay ID is therefore valid only for a limited time.
1.1 Names in stored replays
A stored replay contains the names, colors, account names and Elo of all players. A player whose name is not shown in the lobby appears in the replay as "Player" followed by the first 2 characters of the account name.
2. Opening a replay
| Address | Result |
|---|---|
https://territorial.io/?r=<ID> | The game opens the menu ▶️ Replay and loads the replay data. ▶️ Launch starts the replay. The address keeps ?r=<ID>, so it can be shared. This works only in the browser version. |
https://territorial.io/log/?r=<ID> | The replay data as plain text. This is the address in the message at the end of a game. |
For an unknown or overwritten replay ID, the Replay menu shows "This replay does not exist." and the text address returns an empty text.
Example: the replay ID is AbC12x. The address https://territorial.io/?r=AbC12x opens the replay in the game.
4. Watching a replay
- A replay shows the game through the eyes of 1 player. In a stored multiplayer replay, the server chooses this player randomly.
- A right click on the territory of a player switches the view to this player.
- In a replay, no player can be controlled. Attacks and other actions are not possible.
- The replay bar at the bottom of the screen has a play and pause button and the button Replay Speed.
Replay Speed has exactly 9 values:
| Speed | Meaning |
|---|---|
| 10×, 5×, 3×, 2×, 1.5× | faster than the real game |
| 1× (default) | real speed |
| 0.75×, 0.5×, 0.25× | slower than the real game |
5. Data in a replay
The replay data contains more than the actions of the game. In theory, a program can read these values from the replay data:
- the account names of all human players,
- the names of all human players,
- the colors of all human players,
- the game mode, the map and whether the game was a contest,
- the number of human players,
- in 1v1: the 1v1 Elo of both players at the start of the game.
The format of the replay data is not documented in this wiki. It can be found by examining the game code: territorial.io loads the game from index.html, and the part of this code that starts a replay reads the replay data field by field. Replay data is free and needs no account. A program gets it from https://territorial.io/log/?r=<ID> (see section 2). The account names can be used with the API.