Building a Zero-Backend 3x3 & 5x5 Adjacency Synergy Graph + URL Codec for 9 Kings Version 1.0

With 9 Kings Version 1.0 launching in November 2026 and unlocking cross-king custom decks, planning...

啊伟 (Open-Source)2 min read1 kali dilihat
Building a Zero-Backend 3x3 & 5x5 Adjacency Synergy Graph + URL Codec for 9 Kings Version 1.0

With 9 Kings Version 1.0 launching in November 2026 and unlocking cross-king custom decks, planning optimal 3×3 core plots (and late-game 5×5 expansions) past Year 33 turned into a fun graph-optimization problem.

Instead of tracking builds in static spreadsheets, I built NineKingsLab — a 100% free, zero-login interactive 3×3 / 5×5 build planner and synergy calculator in Next.js 15 + TypeScript.

1. Modeling Orthogonal & 8-Neighbor Synergy Graphs

Buildings like Beacon, Blacksmith, Library, Amplifier, Forest, and Vault buff either orthogonal (4-way) or full adjacent (8-way) tiles, scaling with plot level (1–3) and enchantment stacks:

const DIRS_8 = [
  [-1,-1], [-1,0], [-1,1],
  [ 0,-1],         [ 0,1],
  [ 1,-1], [ 1,0], [ 1,1],
];

// For each buff plot, evaluate outgoing edges to adjacent combat/economy plots
// and flag layout optimization hints (e.g., moving Beacon to center tile (2,2)).

2. Stateless Shareable Build Links (?b=...)

Players share builds on Reddit (r/9Kings), Discord, and Steam Guides — requiring zero database writes or user accounts. Encoding the Primary King, allied Custom Deck Kings, grid mode (3×3 or 5×5), and occupied tile tuples into a compact URL-safe payload keeps links short and instant to hydrate on load.

Explore the Planner & 1.0 Meta Presets

Independent community-built companion tool — not affiliated with Sad Socket or Hooded Horse.


Sumber artikel open-source oleh 啊伟 di DEV Community — Baca artikel asli. Topik: #gamedev #nextjs #typescript #webdev

Sukai & bagikan artikel ini

Komentar