sparkengine-networking-security-and-multiplayer

Guides SparkEngine UDP multiplayer networking, authentication security, and replication work with verified code anchors.

31|3|Updated Jul 26, 2025
One-click install
npx skills add https://github.com/Krilliac/SparkEngine --skill sparkengine-networking-security-and-multiplayer-krilliac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparkengine-networking-security-and-multiplayer
Source: https://github.com/Krilliac/SparkEngine/tree/main/.claude/skills/sparkengine-networking-security-and-multiplayer
Command: npx skills add https://github.com/Krilliac/SparkEngine --skill sparkengine-networking-security-and-multiplayer-krilliac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on SparkEngine's multiplayer stack requires knowing which networking and security components are actually wired versus test-only, what the wire protocol guarantees, and where the known gaps are. This Skill provides a verified runbook of the UDP transport, packet validation, client prediction, lag compensation, and MMO account security so changes are made against real code behavior rather than assumptions. ## Core Features & Use Cases - Wire protocol and ingress rules: Documents the SPRK magic header, channel limits, payload caps, PacketValidator schema enforcement, and the absence of protocol version negotiation. - Auth and credential security ledger: Reconciles exact claims about PBKDF2-HMAC-SHA256 at 600k iterations, OS-backed CSPRNG usage, 128-bit session tokens, and fail-closed login behavior in MMOAccountSystem. - Open gaps and decision rules: Lists unwired encryption, stub SteamTransport, fallback singleton, and skip-trap test caveats, plus rules for adding message types, hashing passwords, and generating tokens. - Use Case: When asked to add a new network message type, follow the decision rule to add the MessageType enum, register a MessageSchema in PacketValidator, update the wire-format spec, and add an adversarial test case. ## Quick Start Ask the assistant to verify whether the login system is secure and to walk through the session token and password hashing implementation using this Skill.

Frequently Asked Questions about sparkengine-networking-security-and-multiplayer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new network message type in SparkEngine?

Add the enum value to MessageType in NetworkManager.h, register a MessageSchema in PacketValidator with size, auth, and direction rules, update docs/specs/networking-wire-format.md, and add an adversarial test case. Unregistered custom types from unauthenticated senders are rejected by design.

Is the SparkEngine MMO login system secure?

Passwords use PBKDF2-HMAC-SHA256 at 600,000 iterations with 128-bit salts and constant-time comparison, and session tokens are 128-bit values from an OS-backed CSPRNG that fails closed. However, accounts are RAM-only with no persistence, and network traffic itself is unencrypted plaintext UDP.

Does SparkEngine encrypt network traffic?

No. NetworkManager sends plaintext UDP, and the NetworkEncryption and NetworkSecurity layers have zero production consumers, existing only in tests and the unwired NetworkStack. Wiring real encryption requires replacing the XOR/HMAC stand-in with a vetted AEAD design.

Why do SparkEngine network tests pass instantly but nothing works?

When ENABLE_NETWORKING is OFF, network tests compile to a single always-passing skip stub, so a green ctest proves nothing. Check CMakeCache.txt for ENABLE_NETWORKING=ON and confirm the test binary lists real test names rather than only the skipped variant.

Why does client prediction rubber-band under high latency?

ClientPrediction trims pending inputs above the default cap of 128, silently dropping the oldest inputs under sustained server ACK starvation. Check GetPendingInputCount and raise the limit deliberately with SetMaxPendingInputs rather than removing the cap.

When should I not use this networking Skill?

Use other Skills for database persistence and schema migrations, module DLL ABI and hot-reload concerns, incident history, generic build or CI failures, and release-readiness gating. This Skill covers only the UDP transport, replication, prediction, and credential security layers.