The ECS Pattern & Zig Core
Understanding the Entity-Component-System architecture, deterministic Fixed64 physics, and ODY1 licensing contracts inside Zig Server V2.
Systemic Decoupling (Bricks → Glue → Manager)
In Zig Server V2, data and logic are strictly separated to preserve cache locality and deterministic execution across shards:
- 01 Entities
Lightweight integer identifiers representing actors, projectiles, plants or world parcels without embedded logic.
- 02 Components
Contiguous pure data structs (Position, Velocity, Health, StorageBaseline).
- 03 Systems & Deferred Structural Mutations
Systems iterate over component views without mutating the registry structure mid-loop. Structural changes (adding/removing components or destroying entities) are buffered in a managed list and applied after iteration.
const Position = struct {
x: Fixed64,
y: Fixed64,
z: Fixed64,
};
fn movementSystem(registry: *Registry, deferred: *std.array_list.Managed(EntityId)) !void {
const view = registry.view(.{ Position, Velocity });
for (view) |entity| {
entity.pos.x = entity.pos.x.add(entity.vel.dx);
entity.pos.y = entity.pos.y.add(entity.vel.dy);
if (entity.pos.isOutOfBounds()) try deferred.append(entity.id);
}
} Network Ports & Surfaces
- Port 2106 (TCP/TLS) : Login Server — initial handshake, account verification and realm routing.
- Port 7777 (TCP/TLS) : Game Server — authoritative 100 Hz binary gameplay loop.
- Port 8082 (HTTP/WS) : WebAdmin REST & WebSocket API — instance administration, live telemetry and private MCP endpoint.
- Port 5174 (HTTP) : Vault WebAdmin React Studio UI.
- Port 4321 (HTTP) : Nexus Commercial Portal & Studio Account Hub.
ODY1 Capacity Keys (Zero Feature Gating)
Ultimate Odycer never gates engine systems behind licence tiers. Without a key, any server runs in 20 CCU Evaluation mode. Registering a studio unlocks a free Ed25519-signed ODY1 key for 50 CCU (up to 58 CCU with approved creator referrals). Keys can be set in config.json or applied live via POST /license/activate on port 8082.
Client Integration & Codex Workshops
Godot 4.x (C# desktop and OpenXR VR) and Nethercore clients connect through versioned binary packets. Assets authored in the local workshops (Architecture blueprints, PlantLab 4-season profiles, Creature genomes and .mapodc maps) export clean JSON/GLB bundles for client and server loading.