Logo FSBarV1_Archived

Visualization

FSBar.Viz renders BAR game state through a declarative scene API built on SkiaSharp + Silk.NET (via the in-house SkiaViewer package).

Entry points

Unit glyph language

FSBar.Viz.UnitGlyph is the information-dense renderer behind VizConfig.UseGlyphRenderer (default true). Every unit draws as:

Hotkeys layer additional overlays on the glyph: W weapon ranges, L sight, C command queue, N full names, P style configurator.

Unit display adapter

UnitDisplayAdapter is the single constructor for UnitDisplay values across every surface (live viewer, encyclopedia, style preview). Three entry points:

UnitDisplayAdapter.ofTrackedUnit defCache teamId unitId trackedUnit
UnitDisplayAdapter.ofTrackedEnemy defCache enemyId trackedEnemy
UnitDisplayAdapter.ofEncyclopediaEntry entry pinnedFootprint

This guarantees that a glyph in the Viewer matches the glyph in the Units tab byte-for-byte.

Style configurator

Press P in the live viewer (or open the Hub Style tab) to toggle a side panel exposing every VizConfig / UnitGlyphStyle attribute via typed descriptors:

Adding a new visual attribute means appending one entry to ConfigDescriptors.all; the panel and preset roundtrip pick it up automatically.

Synthetic data pipeline

FSBar.SyntheticData.Scenes produces deterministic Scene values without an engine. Used by:

Notes

Regenerating unit labels

When the BarData package bumps, regenerate the committed label table:

dotnet fsi src/FSBar.Viz/scripts/gen-unit-labels.fsx

The generator exits non-zero if an existing label would silently change (SC-006 tripwire).

Type something to start searching.