
Device-Adaptive Effects
Use the SDK's device signals to keep visual effects smooth on lower-end phones and comfortable for players who prefer reduced motion.
Why Adapt Effects?
Games should sustain 60 FPS on low-end Android devices, not only on the phone used to build them. Too many particles, full-resolution post-processing, camera shake, and decorative tweens can cause dropped frames, battery drain, and heat. A hot or stuttering game is also more likely to lose the player.
Performance is only half of the decision. Flashing, shake, camera bob, parallax, and large decorative movement can make a game uncomfortable even on a high-end device. The SDK therefore exposes accessibility separately from device performance.
Choose the Right Signal
| Getter | Values | Use it for |
|---|---|---|
getMotionQuality() | 'full' or 'reduced' | The simple default switch: use a complete effects preset or a quieter, cheaper one. |
getDeviceTier() | 'low', 'medium', 'high', or 'unknown' | Three-level performance budgets such as particle counts, post-processing, and render scale. Treat 'unknown' conservatively. |
prefersReducedMotion() | boolean | Accessibility. Reduce flashing, screen shake, camera bob, parallax, and decorative motion whenever it is true, regardless of device tier. |
Under the default motion_quality remote-config value ("full"), a low-tier device still reports 'full' unless the player's OS Reduce Motion setting is on. Use getDeviceTier() when you need finer performance tuning; do not assume getMotionQuality() is another name for the device tier.
Where the Values Come From
In the Minit Games app, the host defines all three values on window.minit when the game page loads:
deviceTieris RAM-based: 3 GiB or less is'low', up to 6 GiB is'medium', and more than 6 GiB is'high'. It is'unknown'when the reading is unavailable or times out.motionQualityis resolved by the app from themotion_qualityremote-config value and device capabilities.prefersReducedMotionis the OS accessibility setting captured when the app launches: Reduce Motion under iOS Settings → Accessibility → Motion, or Android's Remove animations setting.
The host values are always defined in supported app builds. They are fixed for the game page load and have no change events, so read them during game setup and configure your effects once.
Each getter resolves its value in this order:
- A valid URL override.
- A host field of the expected type and value.
- A safe fallback.
On the web player, in Studio preview, in older app builds, and during server-side rendering, host fields may be absent. The fallbacks are:
- Reduced-motion preference:
matchMedia('(prefers-reduced-motion: reduce)').matches, orfalseifmatchMediais unavailable. - Device tier:
'unknown'. - Motion quality:
'reduced'when reduced motion is preferred, otherwise'full'.
Unity Editor and non-WebGL builds, Defold non-HTML5 builds, and Godot editor or non-Web builds return their platform fallbacks directly: 'full', false, and 'unknown'.
Apply an Effects Budget
Start with motionQuality as the broad switch. Add tier-specific budgets where a binary choice is not enough, and apply the reduced-motion preference last so accessibility always wins.
The names of your particle systems, camera effects, and tween controllers will differ; the examples show the decisions to connect to those systems.
The Defold and Godot getters ship in the first minit-defold and minit-godot release after v1.17.0; they do not exist in v1.17.0.
import * as Minit from '@minit-games/sdk'
const tier = Minit.getDeviceTier()
const reducedMotion = Minit.prefersReducedMotion()
const fullMotion = Minit.getMotionQuality() === 'full' && !reducedMotion
const tierBudget = {
low: { particles: 20, renderScale: 0.75, postProcessing: false },
medium: { particles: 50, renderScale: 0.9, postProcessing: true },
high: { particles: 100, renderScale: 1, postProcessing: true },
unknown: { particles: 50, renderScale: 0.9, postProcessing: false },
}[tier]
particles.maxCount = reducedMotion ? 0 : tierBudget.particles
renderer.renderScale = tierBudget.renderScale
postProcessing.enabled = tierBudget.postProcessing && fullMotion
screenShake.enabled = fullMotion
cameraBob.enabled = fullMotion
decorativeTweens.enabled = fullMotion
For essential feedback, replace motion instead of simply removing information: use a brief color or opacity change instead of shake, keep gameplay-relevant particles small and short-lived, and avoid rapid flashing.
Test Every Preset
Use URL overrides on the game document's own URL, such as a locally served web export. The getters read the game page's URL, and Studio preview and the web player do not forward their page parameters to the game frame. Outside the app, device-capability fields are absent, so overrides are the reliable way to exercise every path:
?motionQuality=fullor?motionQuality=reduced?deviceTier=low,?deviceTier=medium,?deviceTier=high, or?deviceTier=unknown?reducedMotion=1or?reducedMotion=trueto enable the accessibility preference?reducedMotion=0or?reducedMotion=falseto disable it
Combine parameters to test interactions, for example ?deviceTier=high&motionQuality=full&reducedMotion=1. Any other value is ignored. Reload the game after changing an override because capability values are intended to stay fixed for each game page load.
Check that every combination keeps gameplay readable, that reduced motion removes shake and decorative movement even on 'high', and that the 'low' and 'unknown' presets sustain 60 FPS on representative Android hardware.