computeGameTier function

String computeGameTier(
  1. bool reducedMotion,
  2. bool lowPower,
  3. String thermal,
  4. int ramMb,
  5. int cores,
)

The skin's performance tier, per the webview contract: low when the device cannot animate richly (reduced motion, power save, serious/critical heat, or under 3 GB RAM), mid when it is merely constrained, else high. Skins step effects down on mid, further on low. Port of the tier thresholds the native SDKs apply before the server-driven deviceTier rules (see device-tier.md); the values match Android/iOS high/mid/low, never the legacy minimal/lite/full.

Implementation

String computeGameTier(
  bool reducedMotion,
  bool lowPower,
  String thermal,
  int ramMb,
  int cores,
) {
  if (reducedMotion ||
      lowPower ||
      thermal == 'serious' ||
      thermal == 'critical' ||
      ramMb < 3000) {
    return 'low';
  }
  if (ramMb < 6000 || cores < 6 || thermal == 'fair') return 'mid';
  return 'high';
}