Skip to content

Shrey327/GameX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GameX Engine

GameX Engine is a comprehensive AI-driven game development platform designed to streamline the creation of game narratives, assets, and world-building elements. It leverages advanced LLMs and agentic workflows to generate everything from initial game concepts to detailed questlines and 3D visual assets.

🚀 Features

🌌 SagaAgent: Narrative Generation Pipeline

Powered by LangGraph, the SagaAgent creates deep, interconnected game worlds through a multi-stage, human-in-the-loop workflow:

  1. Concept: Generates core game ideas, genres, and USPs.
  2. World Lore: Builds history, geography, and magic/tech systems.
  3. Factions: Creates political groups, ideologies, and reputation dynamics.
  4. Characters: Generates protagonists and NPCs tied to factions/lore.
  5. Plot Arcs: Designs branching main stories with multiple endings.
  6. Questlines: Develops specific missions and objectives.
  7. RenderPrep: Prepares visual prompts for asset generation.

🎨 Asset Generation

  • Visual Assets: Integrated pipelines for generating character concepts and environment art.
  • 3D Models: Capabilities to generate 3D assets (GLB) from textual descriptions or images.

🧠 Intelligent Orchestration

  • Research Agent: Performs deep web research to ground game concepts in reality or existing fiction styles.
  • Supervisor Agent: Manages state and routes tasks between specialized agents.
  • Memory Persistence: Checkpoint system to save/resume generation sessions and allow iterative feedback.

🏗️ Architecture

The project is divided into two main components:

  • Frontend (/web): A modern Next.js 16 application (React 19) providing an interactive dashboard for managing workflows, viewing generated content, and visualizing assets.
  • Backend (/backend): A FastAPI server that hosts the AI agents, manages sessions, and handles specific generation tasks using Python, LangChain, and LangGraph.

🛠️ Prerequisites

  • Node.js (v18 or higher)
  • Python (v3.10 or higher)
  • uv (Python package manager, recommended) or pip
  • API Keys:
    • Run backend/README.md for specific key requirements (OpenAI/Nebius, Google Gemini, HuggingFace).

🏁 Getting Started

1. Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Create a Virtual Environment (using uv is recommended):

    pip install uv
    uv venv
  3. Activate the environment:

    • Windows: .venv\Scripts\activate
    • Mac/Linux: source .venv/bin/activate
  4. Install Dependencies:

    uv pip install -r requirements.txt
  5. Configure Environment Variables: Create a .env file in the backend or root directory with the following keys:

    # AI Providers
    GOOGLE_API_KEY=your_gemini_key
    NEBIUS_API_KEY=your_nebius_key
    OPENAI_API_KEY=your_openai_key  # Optional if using Nebius for OpenAI-compatible endpoint
    HUGGINGFACE_API_KEY=your_hf_key
    
    # Configuration
    MODEL=openai/gpt-oss-120b # or other preferred model
  6. Run the Server:

    # Run from root or backend directory ensuring paths are correct
    python backend/main.py

    The API will be available at http://localhost:8000.

2. Frontend Setup

  1. Navigate to the web directory:

    cd web
  2. Install Dependencies:

    npm install
    # or
    yarn install
  3. Run the Development Server:

    npm run dev

    The web interface will be available at http://localhost:3000.


📖 API Usage Overview

The Backend exposes several key endpoints for the Saga workflow:

  • POST /api/workflow/start: Initialize a new game generation session.
    • Accepts topic, research_required, etc.
  • POST /api/workflow/feedback: Provide user feedback on the current stage (e.g., critique the generated Factions).
  • POST /api/workflow/continue: Proceed to the next stage after approval.
  • GET /api/workflow/state/{session_id}: Retrieve current generation state and data.
  • POST /api/generate: Standalone endpoint for asset generation (images/3D).

📂 Project Structure

ProjectX/
├── backend/
│   ├── SagaAgent/         # Core logic for narrative generation (LangGraph)
│   ├── Research/          # Web research agent modules
│   ├── models/            # Pydantic data models
│   ├── nodes/             # Processing nodes for image/3D generation
│   ├── main.py            # FastAPI entry point
│   └── requirements.txt   # Python dependencies
├── web/
│   ├── src/
│   │   ├── app/           # Next.js App Router pages
│   │   └── components/    # React UI components
│   ├── package.json       # JS dependencies
│   └── next.config.ts     # Next.js config
├── generated_images/      # Output directory for visual assets
└── README.md              # Project documentation

📜 License

Project X - Internal Use Only

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors