godot-llm  by Adriankhl

LLM integration for game development

Created 2 years ago
251 stars

Top 99.9% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a comprehensive integration of Large Language Models (LLMs) directly into the Godot game engine. It empowers game developers to easily incorporate advanced AI capabilities such as dynamic content generation, intelligent NPCs, and design assistance within their projects. The primary benefit is enabling sophisticated LLM features locally, even on consumer-grade hardware, by leveraging efficient backends like llama.cpp.

How It Works

The core of the project lies in its Godot-native nodes (GDLlama, GDEmbedding, GDLlava, LlmDB) that abstract the complexities of LLM inference. It utilizes llama.cpp to run various LLMs (e.g., Llama-3-8B) efficiently on CPU or via Vulkan GPU acceleration. This approach allows developers to integrate text generation, text embedding for semantic search, and even multimodal understanding (image + text) directly within their GDScript workflows, making AI-driven game development more accessible.

Quick Start & Requirements

Installation involves adding the plugin directly from the Godot Asset Library or by placing a downloaded release zip into the project's addons folder. Key requirements include:

  • Godot Engine.
  • LLM models in GGUF format (e.g., Meta-Llama-3-8B-Instruct-Q5_K_M.gguf).
  • For multimodal features (GDLlava), a corresponding mmproj.gguf file is necessary.
  • Optional: Vulkan SDK for GPU acceleration.

Highlighted Details

  • Retrieval-Augmented Generation (RAG): Features an LlmDB node, a vector database built on SQLite, enabling persistent storage of game data and retrieval of relevant context to enrich LLM prompts, effectively providing long-term memory.
  • Multimodal Capabilities: The GDLlava node supports generating text descriptions or responses based on image inputs combined with text prompts.
  • Local & Efficient Execution: Designed to run LLMs locally using llama.cpp, supporting both CPU and Vulkan backends, minimizing the need for powerful hardware or external APIs.
  • Structured Output Generation: The GDLlama node can generate text adhering to specified JSON schemas or GBNF grammars, ensuring structured and predictable AI outputs.

Maintenance & Community

The project is actively developed by Adriankhl, with a roadmap indicating plans for broader platform support (including Android), integration with other LLM frameworks like mlc-llm, and enhanced in-editor documentation. Specific community channels (like Discord/Slack) or major sponsorships are not detailed in the provided README.

Licensing & Compatibility

The specific open-source license for this repository is not explicitly stated in the provided README content. This omission requires further investigation before adoption, particularly concerning commercial use or linking with closed-source projects.

Limitations & Caveats

LLM inference can be slow, necessitating the use of asynchronous background processing via signals. Each node supports only one background operation at a time, requiring careful management to avoid UI freezes. Users on Arch Linux should use the official Godot build due to potential GDExtension-related crashes. macOS support is noted as "best effort." The Vulkan backend may require manual configuration if multiple GPU drivers are present.

Health Check
Last Commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by George Hotz George Hotz(Author of tinygrad; Founder of the tiny corp, comma.ai), Pawel Garbacki Pawel Garbacki(Cofounder of Fireworks AI), and
29 more.

nanochat by karpathy

0.0%
59k
A minimal, full-stack LLM implementation for accessible AI development
Created 1 year ago
Updated 1 month ago
Feedback? Help us improve.