Public Protocol Manual

A fair voxel world must publish its rules before it asks for trust.

NiceChunk documents the code path from seed to chunk, from player action to state change, and from client behavior to future on-chain verification.

  • Alpha Documentation
  • Seeded Chunk Engine
  • Public Rulebook
  • Chain Boundaries
  • Versioned Specs
Seed NCK-DOCS-0000

Protocol Map

The docs follow the same layers as the product.

NiceChunk is not documented as a marketing site. It is documented as a public rules surface for players, builders, node operators, auditors, and future governance.

01 World Protocol

Seeded terrain, large biome masks, slope-limited mountains, oceans, forests, snow bands, and block resource rules.

02 Action Rules

Hotbar-selected behavior, mining range, block placement, inventory movement, forging inputs, and validation boundaries.

03 State & PDA Model

GlobalConfig, chunk override accounts, Guardian registry PDAs, version hashes, and what should not be stored on-chain.

04 Guardian Network

Regional access nodes, realtime messages, non-custodial boundaries, NCK stake, and future availability proofs.

Status Model

Every rule must say whether it is live, planned, client-only, or intended for chain verification.

This is the core documentation rule for NiceChunk. A feature can be playable before it is fully decentralized, but the page must say which part is already live and which part is still a protocol target.

Live Alpha Playable client behavior

Browser world, seeded terrain, movement, mining interaction, placement preview, hotbar, backpack UI, forging UI, minimap, and wallet login.

Devnet / Chain Explicit Solana state

GlobalConfig, player/session bridges, Guardian registry and region accounts, NCK mint binding, and PDA derivation rules.

Planned Protocol Future verification layers

Chunk override compression, resource settlement, asset ownership, marketplace settlement, Watcher proofs, and governance controls.

Trust Boundary No hidden claims

The docs must not imply that client-only rendering, local cache, or unreleased systems are already fully decentralized.

Quick Start

Enter, inspect, and verify the alpha world.

Enter the world

Open the browser client, connect a Solana wallet, and create a player profile before moving into the voxel world.

Explore chunks

Walk through seeded terrain while the client loads nearby chunks, caches explored map data, and unloads GPU resources when regions are far away.

Use the selected item

The hotbar controls the action: empty hand swings, pickaxe mines, and block items place blocks within range.

{
  "client": "browser",
  "currentNetwork": "solana-devnet",
  "world": {
    "seed": "nicechunk-mainnet-001",
    "chunkSize": 16,
    "renderDistance": 6,
    "preloadDistance": 9,
    "generator": "voxel-seeded-terrain-v2"
  },
  "rule": "Generated terrain costs no chain storage until players change it."
}

World Generation

The same seed and rule version must rebuild the same world.

Terrain is generated from deterministic inputs. Large climate regions are sampled first, then oceans, dunes, foothills, mountains, snow bands, trees, and resource hints are layered on top.

Interactive Demo Seeded Chunk Preview
Dominant BiomeGrassland
Height Hash0x0000
Resource Hints0
Deterministic Seed contract

A public seed is normalized into numeric streams. Terrain, climate, tree palettes, and resource hints must use seed-derived streams.

worldSeed = hash(seed)
height = terrain(worldSeed, chunkX, chunkZ, x, z)
Implemented Slope-limited mountains

Mountain growth is broad and probabilistic. Final terrain limits neighboring columns to natural one-block steps where gameplay requires traversal.

nextHeight = rawHeight(x, z)
height = min(nextHeight, neighborHeight + 1)
Inspectable Large biome regions

Low-frequency climate masks allow large plains, deserts, ocean bodies, forests, foothills, and snow regions without hard size caps.

temperature = fbm(x * 0.0032, z * 0.0032)
moisture = fbm(x * 0.0038, z * 0.0038)

Chunk System

World coordinates become chunk coordinates, local block coordinates, and cache keys.

A chunk is a 16 x 16 X/Z area. The client currently renders a 13 x 13 visible chunk square and preloads a wider 19 x 19 square to reduce stalls. Rendering resources can unload while discovered minimap data stays cached.

Coordinate Demo World To Chunk
const CHUNK_SIZE = 16;

function worldToChunk(worldX, worldZ) {
  return {
    chunkX: Math.floor(worldX / CHUNK_SIZE),
    chunkZ: Math.floor(worldZ / CHUNK_SIZE),
    localX: mod(worldX, CHUNK_SIZE),
    localZ: mod(worldZ, CHUNK_SIZE)
  };
}

function chunkKey(worldX, worldZ) {
  const chunkX = Math.floor(worldX / CHUNK_SIZE);
  const chunkZ = Math.floor(worldZ / CHUNK_SIZE);
  return `${chunkX},${chunkZ}`;
}

function chunkCommitment(seed, chunkX, chunkZ, ruleVersion, overrideRoot) {
  return sha256(`${seed}:${chunkX}:${chunkZ}:${ruleVersion}:${overrideRoot}`);
}

On-chain State

The chain stores commitments and player-owned state, not every generated block.

NiceChunk’s storage model is designed around one rule: deterministic generated terrain should be free to reconstruct, while changed or economically meaningful state becomes explicit and verifiable.

Account PDA Seed Role
GlobalConfig ["global-config"] Immutable world-law layer: NCK mint, world seed hash, chunk size, rule hashes, fees, and Guardian parameters.
GuardianRegistry ["guardian-registry", global_config] Registry for active Guardian regions, NCK stake amount, treasury token account, and registration counters.
GuardianRegion ["guardian-region", global_config, region_x, region_y] A registered region endpoint with owner, operator, host, TLS flag, stake, proof counters, and update slot.
Chunk Override ["chunk", global_config, chunk_x, chunk_z] Future production account for current block overrides only. Unchanged generated terrain should not be stored.
// Current public constants surfaced by the SDK
CONFIG_MAGIC = "NCKCFG01"
GLOBAL_CONFIG_LEN = 293
CHUNK_SIZE = 16
GUARDIAN_REGION_SIZE = 100
GUARDIAN_STAKE_AMOUNT = 100_000 NCK

// Storage principle
generated_block = derive(seed, chunk, local_position)
changed_block = read_override(chunk_pda, local_position)

Player Actions

The selected hotbar slot is the action contract.

NiceChunk actions should be predictable before they are submitted. The client resolves input based on the held item, then range and target rules decide whether an action is valid.

Empty hand

Clicking with no held item produces a swing only. It does not mine or place.

Pickaxe

A mining tool resolves clicks into mining attempts and consumes durability when successful.

Block item

A block stack resolves clicks into placement attempts within range and consumes one item per successful placement.

type HeldItem =
  | { type: "empty" }
  | { type: "tool"; toolId: "iron_pickaxe"; durability: number }
  | { type: "block"; blockId: string; amount: number };

function resolvePrimaryAction(item: HeldItem) {
  if (item.type === "tool" && item.toolId === "iron_pickaxe") return "mine";
  if (item.type === "block" && item.amount > 0) return "place";
  return "swing";
}

Mining & Resources

Resource outcomes should be reproducible from public inputs.

Basic terrain can be deterministic, but valuable resources must not be fully predictable from public world seed alone. Discovery should combine public commitments with action-specific inputs so players can verify outcomes without pre-scanning every valuable coordinate.

Proof Demo Mining Roll
function resourceRoll(input) {
  const payload = [
    input.worldSeedHash,
    input.resourceRuleHash,
    input.chunkX,
    input.chunkZ,
    input.blockX,
    input.blockY,
    input.blockZ,
    input.chunkStateHash,
    input.playerNonce,
    input.recentSlotEntropy
  ].join(":");

  return hashToUnit(payload);
}

Forging, Assets & Inventory

Items need readable state before they become tradable assets.

Hotbar slots, durability, stack limits, recipes, material inputs, and future asset metadata are documented as state models rather than hidden UI behavior.

Hotbar

The active bar has 9 slots. Stackable items can hold up to 99 per slot.

Durability

Tools use durability instead of stack amount. The current default tool durability is 999.

Recipes

Forged outputs should declare their input materials, output item, quality fields, and future verification path.

{
  "recipeId": "iron_pickaxe_basic",
  "inputs": [
    { "itemId": "iron_ingot", "amount": 3 },
    { "itemId": "wood_handle", "amount": 2 }
  ],
  "output": {
    "itemId": "iron_pickaxe",
    "durability": 999
  }
}

NCK Economy

NCK utility must be documented by status, not by hype.

NCK is designed as the core utility token for access, in-world actions, forging systems, marketplace settlement, Watcher incentives, and future governance mechanics.

UtilityStatusNotes
Genesis accessPlannedAccess can be connected to NCK and Genesis Pass logic.
Forging systemsPlannedEconomic settlement should expose recipe and material state.
Marketplace settlementPlannedPlayer-owned assets require explicit asset metadata and settlement rules.
Guardian stakeDevnetGuardian registration currently sends 100,000 NCK to the treasury token account on devnet.
GovernanceLong-termProtocol parameter changes should be versioned and reviewable.

Watcher Network

Guardians and Watchers are access infrastructure, not asset custodians.

The current Guardian program registers region endpoints and NCK stake on devnet. The broader Watcher network concept is the realtime access layer that keeps regions reachable without owning player assets or signing player transactions.

Watcher Region Live access concept
BoundaryNo custody

Watchers do not hold player assets and do not replace wallet authorization.

BoundaryNo transaction signing

Players interact with Solana wallets directly. Watchers should not process transactions as hidden owners.

DevnetGuardian registry

GuardianRegion accounts store region coordinates, endpoint, owner, operator, stake, proof counters, and update slot.

Solana Integration

Wallet identity and protocol state should stay explicit.

The docs separate live wallet flows, devnet programs, local client cache, and future mainnet commitments. This prevents alpha client behavior from being confused with finalized protocol guarantees.

#[account]
pub struct GlobalConfig {
    magic: "NCKCFG01",
    nck_mint: Pubkey,
    world_id: u16,
    world_seed: [u8; 32],
    terrain_config_hash: [u8; 32],
    resource_rule_hash: [u8; 32],
    client_world_config_hash: [u8; 32],
    chunk_size: u16,
    guardian_region_size_chunks: u16
}

// Future direction:
// chunk_hash = hash(seed, chunk_x, chunk_z, rule_version, override_root)

Fairness, Security & Governance

Rules are only fair when players can inspect the rulebook.

NiceChunk should keep deterministic rules public, version major rule changes, publish test vectors, disclose trust limits, and distinguish live features from planned protocol mechanics.

01Deterministic generation

The same seed, chunk coordinate, and generation version should produce the same result.

02Versioned rule changes

UI changes, world-rule changes, economy changes, and chain-state changes should be tracked separately.

03Trust limits

The docs must state what is client-only, what is Watcher-assisted, and what is intended for on-chain verification.

{
  "generationVersion": "0.1.50",
  "seed": "NCK-TEST-001",
  "chunk": [0, 0],
  "expected": {
    "heightHash": "0x...",
    "resourceHash": "0x..."
  }
}

Changelog

Protocol documentation must record what changed and what did not.

0.1.50 Docs alpha introduced

Adds protocol docs page, public architecture, demos, independent docs language resources, and mainnet docs locale indexing.

0.1.48 Homepage hero logo size update

UI-only change. No gameplay, world generation, economy, or chain-state rule changes.