Offline AI for Games - Running LLMs Without Internet
Cloud AI has a fundamental problem for games: it requires internet. Single-player games need to work offline. Competitive games need to work with high-latency connections. Privacy-focused games can't send player conversations to third-party servers. Offline AI solves all of these.
The Case for Offline AI
- Single-player games. Your game should work on a plane, on a train, or in a bunker with no signal.
- Console and Steam Deck. Portable gaming often means no reliable internet. Offline AI ensures AI features always work.
- Privacy. Player conversations with NPCs never leave the device. No data collection concerns, no GDPR worries.
- Zero marginal cost. Once the model is bundled or downloaded, every AI interaction is free. No per-request fees eating into margins.
- Latency. Local inference on a decent GPU is faster than cloud round trips. No waiting for server response.
- No API outages. Cloud services go down. Local models don't.
Hardware Requirements
Modern open-source LLMs are surprisingly efficient:
- Gemma 3 1B / Phi-3 Mini: Runs on 4GB VRAM. Any gaming GPU from the last 5 years.
- Llama 3.2 3B / Mistral 7B: 6-8GB VRAM. RTX 3060 and up.
- Llama 3.1 8B: 8GB VRAM. RTX 3070 and up.
- Quantized models: 4-bit quantization halves VRAM requirements with minimal quality loss.
Setting Up Offline AI
GenAI Llama is our Unreal Engine plugin for offline AI — supporting 7 HTTP providers and embedded llama.cpp inference:
- Install Ollama on the target machine
- Pre-download models:
ollama pull gemma3:1b - Install GenAI Llama in your UE project
- All AI runs locally — no internet check, no API keys, no cloud dependency
Hybrid Architecture
The smartest approach: use local models for routine AI and cloud models for critical moments.
- Offline (GenAI Llama): NPC barks, item descriptions, ambient dialogue, basic conversations
- Online (GenAI for Unreal): Complex narrative AI, game master decisions, voice conversations with ElevenLabs
GenAI for Unreal supports Ollama through OpenAI Compatible Mode, so you can run local and cloud models through the same codebase and switch at runtime based on connectivity.