Browse/Narrative & Choice/Codex / Encyclopedia
Narrative & Choice

Codex / Encyclopedia

Implementation of codex / encyclopedia that defines how players interact with this aspect of the game, including feedback and progression.

High complexity
4 examples
1 patterns

Overview

As a core game system, codex / encyclopedia balances complexity with accessibility to engage diverse audiences. The mechanic interacts with multiple other game systems, creating emergent gameplay that extends beyond its individual components. Cross-genre adoption of this mechanic demonstrates its versatility and fundamental appeal to players across different gaming preferences.

Game Examples

Sports Games

Sports Games use this mechanic where players respond to dynamic events to min-max their character. The mechanic respects player time and investment, resulting in emergent storytelling.

Competitive Multiplayer Games

Competitive Multiplayer Games use this mechanic where players track multiple variables to progress through the content. Resource scarcity drives interesting decisions, resulting in satisfying progression.

Board Game Adaptations

Board Game Adaptations use this mechanic where players react to emergent situations to explore every possibility. The mechanic integrates seamlessly with other systems, resulting in exploration incentives.

Metroidvanias

Metroidvanias use this mechanic where players time their actions precisely to build a competitive advantage. The mechanic respects player time and investment, resulting in cooperative synergy.

Pros & Cons

Advantages

  • Balances spatial against economic effectively
  • Creates natural cooperation between players
  • Scales well from beginner to advanced play
  • Encourages supportive playstyles and experimentation

Disadvantages

  • Risk of feature bloat in competitive environments
  • Risk of balance issues in competitive environments
  • Can create balance issues if not carefully balanced
  • Creates potential for cheese strategies by experienced players

Implementation Patterns

Journal Engine

Core implementation pattern for handling codex / encyclopedia logic with clean state management.

class CodexEncyclopediaHandler {
  currentNode: string = "greeting";
  flags: Set<string> = new Set();

  getDialogue() {
    const node = DIALOGUE_TREE[this.currentNode];
    return {
      text: node.text,
      choices: node.choices.filter(c =>
        !c.requires || c.requires.every(f => this.flags.has(f))
      )
    };
  }

  choose(choiceIndex: number) {
    const node = DIALOGUE_TREE[this.currentNode];
    const choice = node.choices[choiceIndex];
    if (choice.setsFlag) this.flags.add(choice.setsFlag);
    this.currentNode = choice.next;
    return this.getDialogue();
  }
}