A detective mystery game built with Godot 4.5 and powered by AI-driven dialogue. Players investigate the case of Professor Richards by interviewing suspects, collecting evidence, and solving the mystery.
- Godot 4.5 - Download here
- Python 3.8+
- Git
- MongoDB - For storing game sessions and progress
- OpenAI API Key - For AI-powered character dialogue
Project-Loki/
├── .env # Environment variables (create this)
├── .gitignore # Git ignore rules
├── README.md # This file
│
├── backend/ # FastAPI backend server
│ ├── main.py # API server entry point
│ ├── services.py # Business logic and database
│ ├── characters.py # Character data and prompts
│ ├── story.py # Story and narrative data
│ ├── evidence.py # Evidence system
│ ├── requirements.txt # Python dependencies
│ ├── Dockerfile # Docker configuration
│ ├── docker-compose.yml # Docker compose setup
│ └── prompts/ # AI prompt templates
│
├── godot/ # Godot 4.5 game project
│ ├── project.godot # Godot project file
│ ├── main.gd # Main game script
│ ├── player.gd # Player controller
│ ├── game_manager.gd # Game state manager
│ ├── SceneManager.gd # Scene management
│ ├── dialogue/ # Dialogue system
│ ├── evidence/ # Evidence UI and logic
│ ├── art/ # Art assets
│ └── Assets/ # Game assets
│
└── venv/ # Python virtual environment (created during setup)
git clone <your-repo-url>
cd Project-LokiInstall and start MongoDB on your system:
macOS (using Homebrew):
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-communityUbuntu/Debian:
sudo apt-get install -y mongodb
sudo systemctl start mongodb
sudo systemctl enable mongodbWindows: Download and install from MongoDB Download Center
Create a .env file in the root directory (Project-Loki/.env):
Note: If MongoDB is running on a different host or port, update the MONGODB_URL accordingly.
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r backend/requirements.txt
# Run the backend server
cd backend
python main.pyThe API server will start at http://localhost:8000
cd backend
docker-compose up --build- Open Godot 4.5
- Click Import
- Navigate to
Project-Loki/godot/and selectproject.godot - Click Import & Edit
Make sure the backend server is running first:
# If using virtual environment
cd backend
source ../venv/bin/activate # On Windows: ..\venv\Scripts\activate
python main.pyOr with Docker:
cd backend
docker-compose upYou should see: Uvicorn running on http://0.0.0.0:8000
- Open the project in Godot 4.5
- Press F5 or click the Play button
- The game will connect to the backend at
http://localhost:8000
- The
.envfile must be in the project root directory (not in backend/) - The backend API must be running before starting the Godot game
- Backend runs on port 8000 by default
- Game resolution: 1920x1080 (fullscreen mode)
Once the backend is running, visit:
- Interactive API Docs: http://localhost:8000/docs
- Alternative Docs: http://localhost:8000/redoc