BAR spectator stats widgets: performance and optimization

How stats display widgets handle CPU load and why widget optimization matters for late-game matches.

Tags: beyond all reason, spectator widgets, CPU optimization, moving average, stats display

Why the team stats popup costs more

TeamStats pulls aggregate data across all players on the match. Every few frames it recalculates production queues, resource income, and army composition for both teams. That is significantly more computation than the spectator HUD, which focuses on a single viewer perspective. Running both during a match means the CPU does the same calculations twice.

Moving averages in widget calculations

Stats widgets use moving average algorithms to smooth out the constant fluctuations in resource income and unit counts. A simple moving average uses a ring buffer that stores recent values and drops the oldest one as new data arrives. This approach is extremely efficient and is standard in signal processing.

Weighted moving averages give more importance to recent values, producing results that track current conditions more closely. The trade-off is higher computation cost. Some players have suggested adding averaging options as a toggle so performance-sensitive players can choose the lighter version.

There is an open discussion about moving averaging logic into the Recoil engine itself. If averaging gets implemented at the engine level, widgets could poll pre-computed smooth values instead of running their own algorithms. That would be a major performance win across the entire widget ecosystem.

Reclaim data and future widget features

A pull request is under review to add metal and energy reclaim information to the spectator HUD. The widget is currently being evaluated for inclusion in the base game. Once merged, players will have access to historical reclaim data without needing custom widget installations.

The current engine does not store detailed historical reclaim data by default. Workarounds require widget-level tracking, which adds overhead. An engine-level solution would eliminate that cost entirely.

Creed of Champions: efficiency in everything

Optimized widgets give better data at lower cost. At Creed of Champions, that efficiency extends to how the team communicates. Clean callouts, focused feedback, no wasted words. Members know that every match is a learning session and every piece of information matters.

[Crd] Creed of Champions is a great place to learn and play BAR in a friendly atmosphere. Training sessions, team gameplay, even some non-BAR stuff. Large cross section of abilities, time zones, and game mode interests.

Both good widgets and good teammates deliver exactly what you need without overhead.