Agent skill

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.

Stars 1
Forks 1

Install this agent skill to your Project

npx add-skill https://github.com/nethercore-systems/nethercore-ai-plugins/tree/main/zx/skills/rendering

Metadata

Additional technical details for this skill

author
nethercore-systems
version
1.0.0

SKILL.md

ZX Rendering Techniques

Camera Systems

All camera state in static variables for rollback safety.

Camera FFI

Function Purpose
camera_set(x,y,z, tx,ty,tz) Position + look-at
camera_fov(degrees) Field of view (default 60)

Follow Camera (Core)

rust
static mut CAM_X: f32 = 0.0;
static mut CAM_Y: f32 = 5.0;
static mut CAM_Z: f32 = 10.0;

fn update_follow_camera(tx: f32, ty: f32, tz: f32) {
    let dt = delta_time();
    let t = (5.0 * dt).min(1.0);
    unsafe {
        CAM_X += (tx - CAM_X) * t;
        CAM_Y += (ty + 5.0 - CAM_Y) * t;
        CAM_Z += (tz + 10.0 - CAM_Z) * t;
    }
}

Render Passes & Stencil

Create portals, scopes, masks using render passes.

Function Purpose
begin_pass(clear_depth) New pass
begin_pass_stencil_write(ref, clear) Create mask
begin_pass_stencil_test(ref, clear) Render in mask

Basic Stencil Flow

rust
// 1. Create mask
begin_pass_stencil_write(1, 0);
draw_circle(SCREEN_CX, SCREEN_CY, 200.0);

// 2. Render inside mask
begin_pass_stencil_test(1, 0);
draw_scene();

// 3. Return to normal
begin_pass(0);

Billboard Particles

Function Mode Use
draw_billboard(w, h, 1, color) Spherical Particles
draw_billboard(w, h, 2, color) Cylindrical Trees

Particle System Core

rust
#[derive(Copy, Clone, Default)]
struct Particle { x: f32, y: f32, z: f32, vx: f32, vy: f32, vz: f32, life: f32 }

static mut PARTICLES: [Particle; 256] = [...];

fn render_particles(tex: u32) {
    texture_bind(tex);
    for p in unsafe { PARTICLES.iter() } {
        if p.life > 0.0 {
            push_translate(p.x, p.y, p.z);
            draw_billboard(1.0, 1.0, 1, 0xFFFFFFFF);
            push_identity();
        }
    }
}

Custom Fonts

rust
let tex = rom_texture_str("pixel_font");
let font = load_font(tex, 8, 12, 32, 96);  // 8x12 glyphs

// In render:
font_bind(font);
draw_text_str("SCORE", 10.0, 10.0, 24.0, 0xFFFFFFFF);
font_bind(0);  // Back to default

Coordinate Convention

Y-up, right-handed, -Z forward. When yaw=0, camera looks toward -Z.

Expand your agent's capabilities with these related and highly-rated skills.

nethercore-systems/nethercore-ai-plugins

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.

1 1
Explore
nethercore-systems/nethercore-ai-plugins

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.

1 1
Explore
nethercore-systems/nethercore-ai-plugins

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.

1 1
Explore
nethercore-systems/nethercore-ai-plugins

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.

1 1
Explore
nethercore-systems/nethercore-ai-plugins

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.

1 1
Explore
nethercore-systems/nethercore-ai-plugins

publishing

Publishing Nethercore games to nethercore.systems. Covers ROM packaging with nether pack, release builds, platform upload requirements, versioning, and CI/CD pipeline setup with GitHub Actions. Use when preparing a game for release or setting up automated builds.

1 1
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results