The Durbar Heist game is a prompt warfare game that aims to teach players the basics of prompting AI. In this game, multiple players participate in a sandbox map, each with their own Durbar (Palace) assigned a secret passphrase. The objective is to protect your Durbar's passphrase while attempting to loot other players' Durbars by guessing their passphrases. The game includes configurable time limits and a maximum number of attempts for guessing the passphrase.
The Durbar Heist game is a turn-based strategy game where players interact with AI homemaker robots named Guard. Each player has their own Durbar, which is assigned a secret passphrase. The Durbar contains a treasure room with a fixed amount of gold. Players can attempt to loot other players' Durbars by talking to their Guard and guessing the passphrase. If successful, they steal a fixed amount of gold from the opponent.
To run the Durbar Heist game, follow these steps:
-
Install Docker and Docker-compose on your system.
-
Download the game code from the provided source.
-
Open a terminal or command prompt and navigate to the directory where the game code is located.
-
Create a
.env
file with contents similar to that in the provided.env.example
file. -
For development purposes, you should use the
docker-compose-dev.yaml
file instead:docker-compose -f docker-compose-dev.yaml up --build -d
This will start a local instance of postgres database along with the game server.
To stop the game, execute the following command:
docker-compose -f docker-compose-dev.yaml down
Sometimes you may need to run shell commands inside the docker container. To do so, execute the following command:
To create migrations from your Prisma schema, apply them to the database and then generate artifacts (e.g. Prisma Client):
docker-compose -f docker-compose-dev.yaml run --rm nextjs npx prisma migrate dev
To just generate the prisma client, execute the following command:
docker-compose -f docker-compose-dev.yaml run --rm nextjs npx prisma generate
To view the logs of the game server, execute the following command:
docker-compose -f docker-compose-dev.yaml logs -f nextjs
- Each player has their own Durbar with a secret passphrase.
- Players can attempt to loot other players' Durbars by guessing the passphrase.
- The game includes a configurable time limit for attempting the loot (default: 5 seconds).
- There is a maximum number of attempts allowed to guess the passphrase (default: 3 attempts).
- If a player successfully guesses the passphrase, they steal a fixed amount of gold from the opponent's treasure room.
- Players can update the instruction given to their own Guard at any time.
- The game continues until a game-ending condition is met, such as a player's treasure room being empty.
[TODO: Add game mechanics]
[TODO: Add class documentation]
[TODO: Add example usage]