Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
5

5d-diplomacy-with-multiverse-time-travel

> 编程语言
Open source

5D Diplomacy With Multiverse Time Travel

1.1K stars0 likes1 views
WebsiteGitHub

About

5D Diplomacy With Multiverse Time Travel

5D Diplomacy With Multiverse Time Travel

A new standard in measuring how galaxy-brained you are, 5D Diplomacy With Multiverse Time Travel combines the classic game of pure negotiation with the modern classic game of pure disorientation. Can you convince your opponent to support an attack in the present while simultaneously backstabbing them five years ago and seven timelines over?

Inspired by and indebted to the board game Diplomacy and the video game 5D Chess With Multiverse Time Travel. Both are excellent in their own right, so we recommend picking up a copy of each to understand the rules for 5D Diplomacy.

Diplomacy is a trademark of Avalon Hill. 5D Chess With Multiverse Time Travel is a trademark of Thunkspace, LLC. 5D Diplomacy With Multiverse Time Travel and its creators are not affiliated with either Diplomacy or 5D Chess With Multiverse Time Travel.

Contributing

If you find a bug, please raise an issue.

Note that official development of new features has come to an end. Issues requesting new or modified gameplay features will probably be rejected. Only bug fixes, performance improvements, and quality of life adjustments are likely to be accepted as suggestions.

Feel free to fork this repo and modify the code there if you wish to experiment with more radical changes to the rules or UI. Visit the 5D Diplomacy Discord server to discuss new rules and theory with others.

Installation

There are currently two options for installing 5D Diplomacy. Use quick installation if you just want to play the game. Use manual installation if you want to make code changes.

Quick Installation

Requirements:

  • The correct version of Docker for your operating system.

Steps:

  • Open Docker and leave it running.
  • Open the CLI for your operating system and navigate inside the folder where you've downloaded this repository. If you don't know how to do this, use this tutorial.
  • Via the CLI, run the command docker compose build frontend backend and wait for it to complete.
  • Via the CLI, run the command docker compose up -d and wait for it to complete.
  • Wait an extra few seconds for the server to start up. If you experience errors creating a game in the next step, try waiting longer.
  • Access the game client at http://localhost:5173.

If you ever update the code (manually or via a pull from this repository), you will need to run docker compose down --rmi local, then run through the steps above again. Note that this may result in the database being wiped.

To read server logs, run docker compose logs -f backend.

Manual Installation

The game consists of two components, found in the server and client directories. You must set up and run both to play 5D Diplomacy, unless you're connecting to someone else's server or have implemented a custom client.

The prototype directory contains the original proof of concept from 2021. None of its contents are required for running the latest version of 5D Diplomacy.

Server

Requirements:

  • .NET SDK 8.0.
  • Entity Framework Core command line tools. If .NET has been installed, these can be installed by running dotnet tool install --global dotnet-ef.
  • (Optional) SQL Server. By default, the game uses an in-built SQLite database, but it also supports connecting to an external SQLite or SQL Server database.

Steps:

  • Navigate to the server directory.
  • (Optional) If you want to connect to a custom database, copy appsettings.json to create a new file in the same directory called appsettings.Development.json. Add your database's connection string as the value for the appropriate provider under ConnectionStrings, then set the value for Provider to match the name of the connection string.
  • Run dotnet build.
  • Run one of the following commands, depending on your configuration:
    • If you aren't using a custom database, i.e. if you didn't follow the optional step above, run dotnet ef database update --context SqliteGameContext.
    • If you're using a custom SQLite database, run dotnet ef database update --context SqliteGameContext.
    • If you're using a custom SQL Server database, run dotnet ef database update --context SqlServerGameContext.
  • Run dotnet run to start the server.
  • The server will print its address to the console, likely http://localhost:5000 but it may be different. Note this down for later.

Note that if you ever update the code with changes that affect the database schema (e.g. if you pull a change from this repository that includes a new migration), you will have to run the appropriate dotnet ef database update command again.

Client

Requirements:

  • Node.js v20.
  • Yarn package manager. If Node.js has been installed, this can be installed by running npm install --global yarn.

Steps:

  • Navigate to the client directory.
  • Copy .env to create a new file in the same directory called .env.local.
  • Inside .env.local, replace SERVER_URL with the address of the server noted earlier.
  • Run yarn install.
  • Run yarn dev to start the client in the default browser.

Gameplay

For a basic demonstration of the game and how to play, see the accompanying video.

Setup

First see installation instructions above. 5D Diplomacy can be set to run normal games (where seven players join and enter orders individually) or sandbox games (where a single user enters all orders).

If you wish to play a normal game or let other people see one of your sandbox games, you'll need to expose the domains of your client and/or server (if everyone has set up the client themselves, only a server needs to be exposed). There are various ways to do this, although this guide does not cover them.

If you modify the code and host a game that others interact with, you must provide a link to your modified source code to comply with the terms of the AGPL license. We suggest updating the link to the source code in client/src/components/pages/LandingPage.tsx.

Normal Game

To create a normal game, one player must choose the new game option from the main menu. They must choose the adjacency setting (see game rules below). After a game has been created, the initiating player enters the game and sees the game ID in the top left corner, which they must copy and send to other players.

Other players can then use the join game option from the main menu to join with the supplied game ID.

Note that 5D Diplomacy has no in-built messaging system. Unless you want to play without press, you require a separate program to send and receive press, e.g. a messaging app or voice calls.

A possible exploit exists when playing multiplayer games. Since 5D Diplomacy has no user logins or verification, a player can join as someone else and enter their orders before them. The alternative - allowing each nation to join only once - would mean players can't rejoin after a break or connection issues. While Diplomacy is a game about breaking trust, you'll simply have to trust players not to be quite this devious.

Sandbox Game

To create a sandbox game, select new game from the main menu and choose the sandbox option. Also set the adjacency setting (see game rules below).

In sandbox mode, turns advance after submission whether all nations have orders or not.

Game Rules

The rules of 5D Diplomacy generally extend the rules of regular Diplomacy. This guide covers only deviations from the rules of the base game.

The game world consists of a grid of Diplomacy boards. Each row is a timeline, and each timeline progresses with boards following the standard Diplomacy turns (Spring 1901, then Fall 1901, then Winter 1901, then Spring 1902, etc.).

Order Entry

At a given time, only units on the active boards (those furthest to the right in each timeline) can have new orders assigned. Other units are locked into their pre-existing orders, which can't be changed, though their resolution can.

Units in spring or fall turns can be given hold, move, support or convoy orders. These are validated against standard Diplomacy adjacency rules, with extra possibilities for multiverse travel. The adjacency strictness setting (chosen when a new game is created) determines how units can move through the multiverse.

With strict adjacencies, a unit can move/support/convoy to:

  • Any adjacent region on its own board.
  • The same region on a different board exactly one timeline up or down, e.g. moving from Paris in Timeline 2 to Paris in Timeline 1.
  • The same region on a different board exactly one board in the past, e.g. moving from Berlin in Fall 1901 to Berlin in Spring 1901. Note that moving to winter boards is forbidden and these are skipped when determining board adjacencies, so Spring 1902 is adjacent to Fall 1901.
  • Any region it is successfully convoyed to (see below).

With loose adjacencies, a unit can move/support/convoy to:

  • Any adjacent region on its own board.
  • The same region on a different board exactly one timeline up or down, or any region adjacent to that region within its board, e.g. moving from Paris in Timeline 2 to Gascony in Timeline 1.
  • The same region on a different board exactly one board in the past, or any region adjacent to that region within its board, e.g. moving from Berlin in Fall 1901 to Kiel in Spring 1901. Winter boards are still ignored.
  • Any region it is successfully convoyed to (see below).

In either case, note in particular that movement one board diagonally is not permitted (without a convoy).

Convoys extend the quirk of standard Diplomacy that allows armies to move an arbitrary distance in a single turn if a chain of convoying fleets exists. Providing each fleet is adjacent to the next and all are ordered to perform the same convoy, an army could go almost anywhere.

Units are however forbidden from moving into boards that don't exist yet, even with convoys. Convoys and supports though can anticipate a future unit moving back in time, so the player can use the ghost board to enter supports/convoys via an arbitrary location in the multiverse.

Any units in (spring or fall) boards not assigned orders are given a hold order by default.

Adjudication

The rule of thumb for adjudication: each time all orders for a turn are submitted, all orders in the entire world are adjudicated together, as if in a single enormous Diplomacy board.

In particular, new orders could affect a prior resolution of existing orders, e.g. a unit that bounced now has support and so moves successfully. This extends to supports/convoys across time, e.g. convoys that were previously invalid may become valid if the future army appears and performs the expected move.

For a given board:

  • If the new resolution matches an existing child board that spawned from this one, then no new timeline splits. So if two units bounced and both receive one new support from their relative future next turn, they still bounce and no new board is created (assuming no other changes elsewhere on this board).
  • If the new resolution does not match an existing child board that spawned from this one, a new timeline appears. New timelines always appear below all existing timelines, and are always created in a canonical order (earliest board first; if boards are of equal age, lowest timeline number first).

Note that this is different to 5D Chess where bo

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言