Skip to content

rlmsinclair/daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daemon - Interactive Multiplayer Game

A multiplayer 2D game web app inspired by Philip Pullman's "Northern Lights" (also known as "The Golden Compass").

About the Project

In this game, each player has a daemon companion powered by Large Language Models (LLMs) like OpenAI's GPT or Anthropic's Claude. Players and their daemons can interact with each other and the environment in a 2D world with various rooms and challenges.

Key features:

  • Personal AI daemons with evolving personalities and stats
  • Real-time multiplayer interactions
  • Various communication channels (public chat, private daemon chat, whispers)
  • Obstacles and challenges that affect daemon development
  • Northern Lights themed environment with day/night cycles

Technology Stack

  • Backend: Python Flask with Flask-SocketIO for real-time communications
  • Database: MySQL (SQLAlchemy ORM)
  • LLM Integration: Support for OpenAI and Anthropic APIs
  • Frontend: (Not included in this repository - to be implemented with Vite + TypeScript)

Getting Started

Prerequisites

  • Python 3.9+
  • Redis (optional, for session management)
  • MySQL (or SQLite for development)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/daemon.git
cd daemon
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables by copying the example and updating values:
cp .env.example .env
  1. Initialize the database:
python init_db.py
  1. Start the server:
python run.py

Project Structure

daemon/
├── app/                  # Main application package
│   ├── api/              # API routes
│   ├── models/           # Database models
│   ├── services/         # Business logic services
│   ├── config/           # Configuration handling
│   └── utils/            # Utility functions
├── tests/                # Test cases
├── run.py                # Application entry point
├── init_db.py            # Database initialization script
├── requirements.txt      # Python dependencies
└── README.md             # Project documentation

Game Mechanics

Daemons

Each player chooses one of three animal forms for their daemon (wolf, fox, or snow leopard), each with different starting personality traits. Daemons have stats that evolve based on interactions:

  • Loyalty
  • Bravery
  • Curiosity
  • Friendliness

World and Obstacles

Players navigate through different rooms in a snowy, Northern Lights-inspired world. They encounter obstacles that can be overcome with different daemon attributes, influencing how the daemon's personality develops.

Communication

  • Public chat: Visible to all players in the same room
  • Whisper: Proximity-based chat visible only to nearby players
  • Daemon chat: Private telepathic communication with your daemon
  • Daemon-daemon interaction: Daemons can interact with each other

Future Development

  • Frontend implementation with Vite + TypeScript
  • Enhanced memory and context management for daemons
  • More sophisticated daemon personality evolution
  • Expanded world with more rooms and challenges
  • Day/night cycle with Northern Lights effects
  • User customization options

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Inspired by Philip Pullman's "His Dark Materials" trilogy
  • LLM integration powered by OpenAI and Anthropic APIs

About

Multiplayer 2D game where every player has an LLM-powered dæmon companion

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages