Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

feat: Implement Fact data transfer system #4

@Bli-AIk

Description

@Bli-AIk

🔗 Is your feature request related to a specific issue?

The library is missing a centralized, decoupled system for storing and accessing global game state. This often leads to developers using tightly coupled components, singletons, or direct references, making the architecture rigid and hard to test.


💡 Feature Description

Create a "Fact" system, which acts as a centralized blackboard or key-value database for storing and querying game state.

  • Expected outcome or effect: A decoupled way for different game systems to communicate and share data without direct references.
  • Specific implementation ideas: The following definitions are for reference only and are subject to change. Implementation could include:
    • A central FactDatabase or Blackboard class.
    • Methods like SetFact(key, value), GetFact<T>(key), and HasFact(key).
    • The ability to subscribe to changes in a specific fact's value.
    • Keys would typically be strings, and values could be any type (int, bool, string, etc.).
  • Usage scenarios or benefits:
    • A quest system can set a fact quest_A_complete to true.
    • An NPC's dialogue logic can read this fact to change its conversation.
    • A door can check for player_has_key before opening.
    • This promotes a highly modular and data-driven architecture.

⚖ Alternatives Considered

N/A


📝 Additional Information

This system will be the foundation for the "Fact-based Rule evaluation" feature.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions