Skip to main content

Introduction to FactsDB

Welcome to the official documentation for FactsDB, a comprehensive and production-ready gameplay state management system for Unreal Engine.

What is FactsDB?

At its core, FactsDB is a centralized, data-driven framework designed to solve a common problem in game development: managing complex game state. It provides a robust, decoupled, and highly debuggable way to store, modify, and query the data that drives your game's logic. From player health and ammo counts to complex AI states and quest progression.

Instead of scattering state variables across countless Blueprints and C++ classes, FactsDB consolidates them into well-defined, reusable structures called Schemas, which are then instantiated at runtime as unique Contexts.

Why Use FactsDB?

If you've ever struggled with "spaghetti Blueprints," race conditions, or debugging why a certain value changed unexpectedly, FactsDB was built for you. It's designed to bring structure and clarity to your project.

  • Single Source of Truth: Facts are stored in a central, accessible location, eliminating data duplication and synchronization headaches.
  • Data-Driven by Design: Designers can define and balance gameplay data in Data Tables without ever needing to recompile code.
  • Decoupled Logic: Game systems can react to data changes through events rather than being directly coupled to the objects that own the data. This makes your codebase more modular and easier to maintain.
  • Unparalleled Debuggability: The built-in FactsDB Debugger is a powerful tool that gives you a live view of all game data, a complete history of every change, a performance profiler, and a powerful query evaluation engine.
  • Optimized for Networking: Built from the ground up with efficient network replication using Unreal Engine's Fast Array Serializer.
The Goal of FactsDB

Empower your team to write less boilerplate code and build more gameplay. By providing a solid foundation for state management, FactsDB lets you focus on what truly matters: creating engaging player experiences.

Core Features at a Glance

  • Schema-Driven Design: Define the structure of your data—types, default values, and read-only status—using UDataTables and a powerful schema inheritance system.
  • Data-Driven Queries: Create complex, reusable logical checks ((Health > 50) AND (HasAmmo == true)) in data assets, completely separate from code.
  • Seamless Blueprint Integration: A suite of custom, type-safe Blueprint nodes makes reading, writing, and listening to fact changes intuitive for designers.
  • Asynchronous Actions: A framework for creating complex, latent Blueprint actions that interact with the facts system over time.
  • Robust Serialization: Save and load the state of any fact context to and from JSON or efficient binary formats, perfect for creating save game systems.

Who is this Documentation For?

This documentation is structured to cater to different roles on your team.

For Designers & Scripters

If you work primarily in the Unreal Editor and Blueprints, you'll want to start with the Designer's Guide. It covers the core concepts and provides step-by-step tutorials on how to use FactsDB to drive your gameplay logic. The Tools & Debugging section will also be invaluable.

For Programmers

If you're a C++ developer, you should start with the Designer's Guide to understand the core philosophy, then move to the Programmer's Guide for a deep dive into the architecture and C++ API. The Reference & Advanced section covers advanced topics like replication and serialization.

Getting Started

Ready to dive in? Let's begin by understanding the fundamental building blocks of the system.

Next Up: Core Concepts