Agent skill
development
Core development workflow for Nethercore WASM games. Covers the nether CLI (build, run, pack), nether.toml manifest authoring, required WASM exports, and determinism rules for rollback netcode. Use when building, configuring, or structuring a Nethercore game project.
Install this agent skill to your Project
npx add-skill https://github.com/nethercore-systems/nethercore-ai-plugins/tree/main/nethercore/skills/development
Metadata
Additional technical details for this skill
- author
- nethercore-systems
- version
- 1.0.0
SKILL.md
Nethercore Development
Overview
Nethercore games compile to WASM and run in the Nethercore player with rollback netcode. All consoles share the same WASM core, ensuring determinism across platforms.
Required Game Exports
Every game exports three functions:
#[no_mangle] pub extern "C" fn init() { } // Setup, asset loading
#[no_mangle] pub extern "C" fn update() { } // Deterministic logic
#[no_mangle] pub extern "C" fn render() { } // Drawing only
nether CLI
| Command | Purpose |
|---|---|
nether init |
Create nether.toml manifest |
nether compile |
Compile WASM from source |
nether pack |
Bundle WASM + assets into ROM |
nether build |
compile + pack (main command) |
nether run |
Build and launch in player |
Game Manifest (nether.toml)
[game]
id = "my-game"
title = "My Game"
author = "Your Name"
version = "1.0.0"
[build]
script = "cargo build --target wasm32-unknown-unknown --release"
wasm = "target/wasm32-unknown-unknown/release/my_game.wasm"
[[assets.textures]]
id = "player"
path = "assets/player.png"
Netcode (What You DON'T Do)
The Nethercore player handles all networking automatically:
- GGRS rollback synchronization
- State snapshots
- Input transmission
- Desync detection
Your only responsibility: Make update() deterministic.
Never write: Networking code, rollback logic, state sync, or input transmission.
Determinism (Rollback Safety)
The update() function must be deterministic for rollback netcode. Given identical inputs, all clients must produce identical state.
Rules
- All state in WASM memory - Use static variables (auto-snapshotted)
- Use FFI
random()functions - Never external randomness - Use
tick_count()not system time - Frame-based logic only - render() is display-only - Never modify game state in render
Forbidden Patterns
| Pattern | Problem | Correct Alternative |
|---|---|---|
rand::thread_rng() |
External RNG | FFI random(), random_range() |
SystemTime::now() |
System clock | FFI tick_count() |
HashMap iteration |
Unordered | Arrays, BTreeMap |
| State changes in render() | Skipped during rollback | Move to update() |
Quick Test
nether run --sync-test --frames 1000
If this fails, you have non-deterministic code.
Project Structure
my-game/
├── nether.toml # Game manifest
├── src/
│ ├── lib.rs # Entry point (init/update/render)
│ └── zx.rs # FFI bindings (console-specific)
├── assets/
│ ├── textures/
│ ├── meshes/
│ └── audio/
└── Cargo.toml
Key principle: Keep entry files minimal (~50 lines). FFI bindings in separate module.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ffi-reference
ZX fantasy console FFI bindings reference. Documents 250+ functions for rendering, input, audio, camera, transforms, textures, materials, and debug. Includes init-only vs render-only call rules and the coordinate system. Use when writing or debugging ZX FFI calls in game code.
console-specs
ZX fantasy console hardware specifications and resource budgets. Covers resolution (960x540), memory limits (4 MB RAM/VRAM, 16 MB ROM), render modes, audio system (22 kHz, 16 channels), and input layout. Use when planning resource budgets or checking console capabilities.
rendering
ZX rendering techniques and patterns. Covers camera systems (follow, orbit), stencil buffer effects (portals, masks), billboard particles, custom fonts, and render pass management. Use when implementing cameras, visual effects, particle systems, or choosing between 2D and 3D rendering approaches.
debugging
Runtime debugging tools for Nethercore games on all consoles. Covers the F4 Debug Inspector, live value editing, watch variables, frame stepping, and time-scale controls. Use when tuning game parameters at runtime, tracking state over time, or stepping through frames to find bugs.
optimization
Optimization techniques for Nethercore WASM games. Covers WASM binary size reduction (LTO, wasm-opt), texture and mesh compression, audio optimization, and state size minimization. Use when a ROM exceeds size limits or when reducing build output size.
testing
Testing Nethercore games for determinism and correctness. Covers sync testing, replay recording and playback, debug actions, and desync diagnosis. Use when running sync tests, setting up replay-based regression tests, or diagnosing determinism failures.
Didn't find tool you were looking for?