Skip to content

DenisIndenbom/ai-game-engine

 
 

Repository files navigation

AI Game Engine

A powerful platform for creating and running AI-driven games where players compete using custom scripts. The engine supports multiple games, real-time gameplay visualization, and comprehensive statistics tracking.

Features

  • Multi-game support with customizable game logic
  • Real-time game visualization using WebSocket communication
  • Player script execution in isolated processes
  • Team-based gameplay mechanics
  • Live statistics and replay functionality
  • Lobby system for game session management
  • Redis-based event messaging system
  • Docker containerization for easy deployment

Tech Stack

  • Python Flask backend with SocketIO
  • Redis for real-time messaging
  • PostgreSQL database
  • Docker and Docker Compose
  • JavaScript frontend SDK

Quick Start

Production Deployment

  1. Create config.py based on config.py.example
  2. Run script python create_game.py to create a game
  3. Put your game files in games/{game_name}/
  4. Run for production:
# Production deployment
docker compose up -d

Development Setup

  1. Create config.py based on config.py.example
  2. Run for development:
# Development setup
docker compose -f compose-dev.yml build
python setup.py
python create_game.py
python server.py

Architecture

  • Game sessions run in isolated processes
  • Real-time updates via Redis pub/sub
  • Secure script execution environment
  • Modular game implementation system
  • Team and player management
  • Session replay capabilities

Project Structure

  • /blueprints - Flask route handlers
  • /games - Game implementations
  • /models - Database models
  • /ge_sdk - Game Engine SDK
  • /static - Frontend assets
  • /redis_client - Redis communication layer

License

TODO: Add license information

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 56.8%
  • HTML 37.0%
  • JavaScript 5.2%
  • CSS 0.7%
  • Mako 0.3%
  • Dockerfile 0.0%