Browse/Narrative & Choice/Declaration of War
Narrative & Choice

Declaration of War

Game design pattern for declaration of war that creates meaningful player choices and engaging feedback loops.

Low complexity
3 examples
3 patterns

Overview

The declaration of war mechanic provides a framework that balances complexity with accessibility to engage diverse audiences. Designers must carefully balance the system's depth against its learning curve, ensuring that new players can engage while experienced players find room for mastery. Cross-genre adoption of this mechanic demonstrates its versatility and fundamental appeal to players across different gaming preferences.

Game Examples

Flight Simulators

Flight Simulators use this mechanic where players track multiple variables to optimize their strategy. Visual and audio feedback make the interaction satisfying, resulting in community formation.

Survival Games

Survival Games use this mechanic where players optimize their build to maximize their effectiveness. Emergent gameplay arises from simple rules, resulting in satisfying progression.

Cooperative Games

Cooperative Games use this mechanic where players weigh competing priorities to complete objectives efficiently. Emergent gameplay arises from simple rules, resulting in satisfying progression.

Pros & Cons

Advantages

  • Balances temporal against spatial effectively
  • Supports diverse viable strategies and approaches
  • Easy to understand but difficult to master

Disadvantages

  • Can become overpowered in the late game
  • Creates potential for abuse by experienced players
  • Risk of tedium in competitive environments
  • Creates potential for min-maxing by experienced players

Implementation Patterns

NPC Scheduler

Optimized pattern for declaration of war that minimizes per-frame computation cost.

class DeclarationOfWarController {
  currentNode: string = "intro";
  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();
  }
}

Lore Database

A modular approach to declaration of war that separates concerns and enables easy testing.

class DeclarationOfWarEngine {
  currentNode: string = "start";
  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();
  }
}

Choice Evaluator

Event-driven pattern that reacts to declaration of war changes and updates dependent systems.

class DeclarationOfWarHandler {
  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();
  }
}