ferravex
GitHub

Original game runtime

ferravex-render implements the shared runtime for thirteen recovered Ferravex games. It depends only on the original core, math and graphics crates. There is no re-export of a third-party engine or window library.

use ferravex_render::prelude::*;
fn config() -> Conf { ferravex_render::window_conf("My game") }
ferravex_render::game!(config, game);
async fn game() {
    loop {
        clear_background(BLACK);
        draw_circle(screen_width() * 0.5, screen_height() * 0.5, 32., ORANGE);
        next_frame().await;
    }
}

A native binary calls the library's run(). A Wasm library exports ferravex_init from the entry macro and the frame/input/geometry ABI from this crate. Set crate-type = ["rlib", "cdylib"] to build both.

Demo provides --autoplay --smoke-frames N --screenshot path.png. Simulation still uses FixedClock; an automated run supplies a reproducible 1/60-second render interval. Screenshots capture queued draws after GPU presentation, including the final frame. ?autoplay enables each game's original pilot in the browser.

Current limits

This runtime has both immediate and retained paths. Immediate vertex transforms, lighting/fog and text geometry are prepared on the CPU. Retained meshes keep immutable geometry on the GPU and stream instance transforms/normal matrices. See retained rendering for storage limits, mutation invalidation, ordering and backend requirements. It has no user shader compiler, textures, skeletal animation, realtime shadows or deferred lighting. Courtyard retains its separate original instanced WebGL2/shadow renderer. The shared native runtime currently supports Linux/X11. Native Windows, macOS and iOS window/GPU bindings, lifecycle integration and device validation remain work to do. System graphics drivers, OS libraries, browser implementations and Rust std are the platform boundary.

Retained rendering requires WebGL2 or Linux OpenGL 3.3+. Draw-call and submission overhead can outweigh CPU savings for small independently authored meshes; use the local performance harness and the immediate escape hatch where appropriate.

Retained 3D draws use conservative camera-frustum culling by default. Optional distance limits, per-object hysteretic LOD and visibility counters are described in visibility. Dune Skimmer and Marble Run exercise authored LOD chains.