Getting Started
Prerequisites
- .NET 10.0 SDK
- Linux (primary dev target). Other platforms work for library/unit tests, but live engine integration is Linux-only.
- For live runs: Beyond All Reason installation with
spring-headless(orspring) and the HighBar V2 proxy (libSkirmishAI.so). The Hub can install a bundled proxy for you.
Standard BAR data directory: ~/.local/state/Beyond All Reason. Engines live under engine/recoil_<YYYY.MM.DD>/ and are auto-detected by FSBar.Client.EngineDiscovery.
Build
|
Run the Hub GUI
|
See Hub GUI for the tab walkthrough.
Run a headless script
|
Repl.fsx loads FSBar.Client + FSBar.Viz and exposes convenience helpers (start, step, units, move, viz, economy). Use it for interactive exploration.
Minimal library example
open FSBar.Client
open FSBar.Client.Commands
use client = BarClient.startHeadless ()
// Pull: block for 5 frames, inspecting each one.
client.WaitFrames 5 (fun frame ->
printfn "Frame %d — %d events" frame.FrameNumber frame.Events.Length)
// Push: subscribe to the observable.
use _ = client.Frames.Subscribe(fun frame ->
printfn "[obs] Frame %d" frame.FrameNumber)
// Always-current snapshot.
let state = client.GameState
printfn "%d tracked units, metal %.0f" state.TrackedUnits.Count state.Economy.Metal
Container
A fully provisioned dev container (SDK, fsautocomplete, FSI MCP, native libs) is available:
|
See container/README.md for GPU passthrough and X11 forwarding.
Running tests
|
Next
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
FSBarV1_Archived