Install
The pfx tool runs on Linux with a Vulkan GPU. Install it with Rust 1.97 or newer (on Debian or Ubuntu, first sudo apt install libasound2-dev libudev-dev libxkbcommon-dev libwayland-dev libx11-dev):
cargo install --locked --git https://github.com/gmrdad82/pfx --tag v1.0.0 pfxThen make a game, play it and open it in the editor:
git init my-gamepfx new my-gamecd my-gamecargo run --releasecargo run --release -- edit
The game is a type that implements pfx_game::Game; main hands it to the launcher, which runs the window, pacing, input, sound and a fixed tick:
use pfx_game::{Config, Game, Input, Tick, World};
struct MyGame;
impl Game for MyGame { fn start(&mut self, _world: &mut World) {}
fn tick(&mut self, _world: &mut World, _tick: &Tick, _input: &Input) {}}
fn main() -> std::process::ExitCode { let config = Config::new("my-game", env!("CARGO_PKG_VERSION"), "content/first.scene.toml"); pfx_game::launch(|| MyGame, config, |_commands| {})}Games built on pfx build and pass their tests on Linux and Windows in CI, build for macOS on Apple Silicon in CI, and run on the Steam Deck through Proton (Windows). A game links the crates it uses by the same tag:
pfx-game = { git = "https://github.com/gmrdad82/pfx", tag = "v1.0.0" }Next steps
Section titled “Next steps”- Make your first game: scaffold, play, edit and bench a game.
- Benchmark a scene: a repeatable headless load with frame stats.
- Render a still with the path tracer: an offline frame, traced and denoised.
- The pfx tool: every command and flag.
Build pfx from source
Section titled “Build pfx from source”cargo build --releasebin/gatebin/gate is what CI runs, one phase per job in parallel: lint (formatting, clippy with warnings as errors, the check that keeps game content out of the engine and the licence check of every dependency), tests (the binaries, examples, unit, integration and doc tests), release (the optimised pfx binary), windows (the game crates’ clippy and tests on Windows) and macos (the game crates on macOS). With no phase it runs lint and tests. CI also runs nightly on main. The GPU tests are #[ignore]d and need a GPU: run a crate’s with cargo test -p <crate> -- --ignored.