✨New Open-Source Project: Local LLM NPCs

✨New Open-Source Project: Local LLM NPCs

posted 0 min read

New Open-Source Project: Local LLM NPCs in Godot 4.x

I’ve been working on a 2D educational game built with Godot 4.x (C#) where NPCs are powered by a local large language model running via Ollama with Google’s Gemma 3n.

✨ Key Features

  • Works fully offline or over LAN (no cloud/API calls)
  • NPCs use LLMs for dynamic conversations with the player
  • Focus on privacy, accessibility, and education
  • Built with open-source tools

Gameplay demo video:
Watch on YouTube

Source code:
GitHub repo


I’d love feedback from fellow devs!
Also curious how others see the potential of local LLMs in game development.

If you read this far, tweet to the author to show them you care. Tweet a Thanks

One fascinating challenge with local LLM-powered NPCs is context management—balancing coherent, memory-aware conversations without overloading limited hardware. I’d love to know how you approached this in your Godot 4.x project.

Thanks for asking! Currently I keep the full conversation history, but I'm planning to implement a rolling history limited to the last 20 messages to better manage memory on resource-constrained devices.
My main context management right now is through dynamic system prompts that include current learning progress and subject focus, which keeps the AI responses relevant and educational.

More Posts

Roo Code Workflow: Build a Free, Always-On LLM-Powered Dev Assistant

livecodelife - Jul 15

Master LLM Prompting: Tips for Better Results

Hirusha Fernado - Feb 26

Useful Tools for LLM Application Development

Hirusha Fernado - Feb 20

Build AI Workflows Visually, Fully Local & Private with Agentic Signal

Code Forge Temple - Aug 20

Infinite Compute Glitch - Why Local AI Matters?

akshayballal - Mar 27
chevron_left