diff --git a/README.md b/README.md index 49ac95f9..0e5deff6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -**50,000 colliding GPU cubes at 119 FPS on an RTX 3060.** +**10,000 GPU cubes orbiting a planet at 2,191 FPS on an RTX 3060.** RustingEngine is a game engine written in Rust, made for big physics scenes: thousands of falling, flying and colliding objects that would make most @@ -94,7 +94,7 @@ cd testGame cargo run --release ``` -Or the black hole, and 50,000 colliding cubes: +Or the black hole, and a physics stress test (prints ms/frame once a second): ```bash cargo run --release --features window --example black_hole @@ -105,6 +105,57 @@ New here? Start with [Getting started](docs/getting-started.md) and the [tutorials](docs/README.md). See the [changelog](CHANGELOG.md) for what is new and the [roadmap](roadmap.md) for what comes next. +## Measured + +The fixed render benchmark (`cargo run --release --example render_bench -- eco `) +renders 600 frames offscreen at 1920x1080: 40 PBR pillars, 1,000 falling GPU +physics bodies, a shadowed sun and 24 point lights. From +[benchmarks/README.md](benchmarks/README.md), v2.5.7, RTX 3060, driver +615.78.08, Ryzen 5 7600X, CachyOS, release build, 95th percentiles: + +| Quality | Frame | CPU | GPU | Draws | Triangles | +|---|---:|---:|---:|---:|---:| +| Eco | 4.5 ms | 0.55 ms | 3.8 ms | 13 | 142,768 | +| High | 6.1 ms | 0.68 ms | 4.8 ms | 23 | 239,648 | + +The runner waits for each frame, so frame time is CPU plus GPU with no +overlap. The same tool fails a change that grows any time by more than 10% +and 0.5 ms, or any work counter by more than 10%. + +## How it is built + +```text +winit input + -> FixedUpdate -> Update -> PostUpdate (Bevy ECS; ECS owns every entity) + -> RenderExtract (the only bridge from gameplay to rendering) + -> prepare changed assets and dirty instance ranges + -> Vulkan: physics compute -> culling -> shadows -> scene -> egui -> present +``` + +- **Hybrid physics.** CPU bodies for what game code touches every frame; + GPU compute bodies for crowds, debris and particles. The GPU sends back + events ("this entered that area"), not every transform. +- **Condition shaders.** A few lines of GLSL can add forces or remove + bodies on the GPU (the black-hole demo is one). +- **Games are normal Cargo projects.** Scenes are reviewable JSON + (`.rscene`), cooked to a binary format for release. The editor never + rewrites your Rust code. +- **Deterministic replay.** Record a session and replay it exactly; the limits are in [docs/determinism.md](docs/determinism.md). + +The layer plan is in [architecture.md](architecture.md); today only +`rusting-core` is split out as its own crate. + +## Status and limits + +- Tested on Linux with an NVIDIA RTX 3060. Windows is a supported export + target, but the benchmarks have not been run on Windows, AMD GPUs or + integrated graphics yet. +- macOS and Android are planned; web, iOS and consoles are not before 1.0 + ([docs/platforms.md](docs/platforms.md)). +- A release build uses fat LTO: the first `cargo build --release --bin rusting` + took about 7 minutes on a Ryzen 5 7600X (checked from a fresh clone on + 2026-12-03). + ## Contributing Bug reports, profiling results, documentation fixes, and focused pull requests