Free Ebook cover Mobile Game Development Essentials: Controls, Performance, and Publishing Readiness

Mobile Game Development Essentials: Controls, Performance, and Publishing Readiness

New course

10 pages

Performance and Battery Essentials for Mobile Game Development

Capítulo 5

Estimated reading time: 10 minutes

+ Exercise

A practical mental model: “work per second” becomes heat, heat becomes throttling, throttling becomes frame drops

On mobile, performance and battery are tightly linked. Most battery drain comes from doing work (CPU/GPU), moving data (memory/network), and keeping components active (high refresh, background tasks). That work turns into heat; when the device gets too hot, it reduces CPU/GPU speed (thermal throttling), which lowers performance even if your code didn’t change. A useful mental model is to treat every frame as a budgeted “envelope” of work: if you consistently exceed it, you pay in battery, heat, and eventually unstable frame pacing.

SymptomLikely causeTypical player-visible effect
Battery drains fast, device warms upHigh sustained CPU/GPU utilizationShort play sessions, discomfort
Frame rate drops after a few minutesThermal throttlingInitially smooth, then choppy
Random stuttersGC spikes, asset loads, shader compilationHitches during action
Crashes on some devicesMemory pressure / OOMApp closes, progress loss

1) What drains battery in mobile games

CPU load (game logic, scripting, animation, AI)

The CPU burns power when it runs many instructions per second or wakes frequently. Common drains include per-frame heavy loops, expensive pathfinding, too many active entities, and frequent allocations that trigger garbage collection.

  • Red flags: CPU time close to or above your frame budget; many small jobs waking each frame; spikes during combat or UI-heavy scenes.
  • Practical check: If lowering resolution doesn’t improve FPS, you are often CPU-bound (not always, but a useful hint).

GPU load (rendering, overdraw, post-processing)

The GPU drains battery when it shades many pixels, runs complex shaders, or processes many draw calls/state changes. Mobile GPUs are efficient but sensitive to overdraw (drawing the same pixel multiple times) and expensive fragment shaders.

  • Red flags: FPS improves a lot when lowering resolution; heavy transparency layers; multiple full-screen effects.
  • Practical check: Temporarily disable post-processing and see if frame time drops significantly.

High refresh rate and frame rate targets

Rendering at 90/120 Hz can feel great, but it multiplies your per-second work. Even if each frame is “fast enough,” doing it 120 times per second increases total energy use and heat.

  • Rule of thumb: A stable 60 FPS often provides better battery and thermals than an unstable 120 FPS.
  • Practical step: Offer a frame rate cap (e.g., 30/60/uncapped) and default to a balanced option.

Background work (timers, analytics, audio, sensors)

Background tasks keep the CPU awake and prevent low-power states. Frequent polling, high-rate sensor reads, or continuous logging can quietly drain battery.

Continue in our app.

You can listen to the audiobook with the screen off, receive a free certificate for this course, and also have access to 5,000 other free online courses.

Or continue reading below...
Download App

Download the app

  • Examples: Running AI updates when paused, updating leaderboards too often, or keeping high-frequency timers active in menus.
  • Practical step: Pause or reduce update rates when the game is not actively rendering gameplay (menus, pause, backgrounded).

Networking (radio wakeups, retries, large payloads)

Network usage costs power because the cellular/Wi‑Fi radio has “tail energy”: after a transfer, the radio stays in a higher-power state briefly. Many small requests can be worse than fewer batched requests.

  • Red flags: Frequent small pings, repeated retries on poor connections, large telemetry payloads.
  • Practical step: Batch events, compress payloads, and avoid sending data every frame or every second.

Screen brightness (not controlled by your engine, but influenced by UX)

The display is often one of the biggest power consumers. While your game usually cannot set brightness directly, bright full-screen visuals encourage users to keep brightness high, and high-contrast flashing can be uncomfortable and power-hungry on some display types.

  • Practical step: Provide darker themes/backgrounds where appropriate and avoid unnecessary full-white screens during loading.

2) Performance budgets: turning “smooth” into numbers

Frame time budget (the core budget)

Instead of thinking “I want 60 FPS,” think “I have 16.67 ms per frame.” For 30 FPS, you have 33.33 ms. Your frame time is typically split between CPU frame time and GPU frame time; the slower side determines the final FPS.

TargetFrame time budgetUse case
30 FPS33.33 msBattery-friendly, lower-end devices, heavy scenes
60 FPS16.67 msMost action games, responsive feel
120 FPS8.33 msHigh-end devices only; strict content limits

Draw calls and state changes

Each draw call has CPU overhead (submission, state validation) and can limit batching. Mobile drivers can be sensitive to many small draws.

  • Budget mindset: Fewer, larger batches are usually better than many tiny draws.
  • Practical steps: Use texture atlases where appropriate, reduce material variants, batch static geometry, and avoid per-object unique materials unless necessary.

Shader complexity and pixel cost

On mobile, fragment (pixel) shading often dominates cost, especially at high resolutions. Expensive operations (multiple texture samples, dynamic branches, high-precision math) add up quickly.

  • Budget mindset: Spend shader complexity only where the player looks.
  • Practical steps: Prefer simpler lighting models, reduce texture lookups, avoid heavy full-screen effects, and be cautious with transparency (it increases overdraw).

Physics steps and simulation frequency

Physics can consume significant CPU time, especially with many colliders, continuous collision detection, or high fixed-step rates.

  • Budget mindset: Simulate at the lowest frequency that still feels correct.
  • Practical steps: Reduce fixed timestep frequency if acceptable, limit active rigidbodies, simplify collider shapes, and disable physics for sleeping/irrelevant objects.

Animation, particles, and “hidden” per-frame costs

Animation blending, IK, particle collisions, and per-particle lighting can quietly dominate frame time.

  • Practical steps: Cap particle counts, avoid expensive particle collisions on mobile, and use LOD-like reductions for effects when off-screen or far away.

3) Stability considerations: keeping performance consistent over time

Memory pressure and out-of-memory risk

Mobile OSes are aggressive about reclaiming memory. If your game uses too much RAM, you risk termination or severe stutters as the system compresses/evicts resources.

  • Common causes: Large textures kept resident, duplicated assets, unbounded caches, loading too many scenes/levels at once.
  • Practical step-by-step:
    • Measure peak memory in representative gameplay (not just the first minute).
    • Identify top memory consumers (textures, meshes, audio, animation clips).
    • Set explicit limits for caches (e.g., max MB or max entries) and enforce eviction.
    • Prefer streaming or segmented loading for large worlds instead of “load everything.”

GC spikes and allocation congestion

Frequent allocations create garbage; garbage collection can pause or steal time, causing stutters. Even if average FPS is high, periodic GC spikes ruin perceived smoothness.

  • Red flags: Regular hitches every few seconds; spikes correlated with spawning/despawning, string formatting, or per-frame list creation.
  • Practical step-by-step:
    • Profile allocations per frame and locate hot paths.
    • Eliminate per-frame allocations (reuse lists/arrays, object pools, avoid per-frame string concatenation).
    • Pool frequently spawned objects (projectiles, enemies, VFX instances).
    • Validate by re-profiling: allocation rate should drop, and hitch frequency should reduce.

Asset streaming and loading hitches

Loading textures, meshes, audio, or shaders during gameplay can stall CPU and/or GPU. Streaming helps, but poor scheduling can still cause spikes.

  • Red flags: Stutter when entering new areas, first-time use of an effect, or when opening an inventory.
  • Practical step-by-step:
    • Identify “first-use” assets that cause hitches (effects, UI panels, rare enemies).
    • Prewarm critical shaders/materials during a controlled loading window.
    • Stream assets earlier than needed (predictive loading) and unload when safe.
    • Throttle streaming bandwidth to avoid competing with rendering on weak devices.

4) Thermal throttling: what it is and how to detect it conceptually

What throttling looks like

Thermal throttling happens when sustained load heats the device beyond a threshold. The OS reduces CPU/GPU frequencies to cool down. The key detail: your game may run perfectly at first, then degrade after minutes even in the same scene.

  • Typical pattern: Stable frame time for 1–5 minutes → gradual FPS drop → occasional stutters → persistent lower performance until the device cools.
  • Why it matters: Optimizations that reduce average frame time but keep utilization near 100% can still throttle; you want headroom.

Conceptual detection without special hardware

You can reason about throttling by correlating time, temperature symptoms, and performance trends.

  • Step-by-step test plan:
    • Run a repeatable scene (same camera path, same number of enemies) for 10–15 minutes.
    • Log frame time (CPU and GPU if available) once per second.
    • Watch for a slow drift upward in frame time after a stable start.
    • Repeat with a lower frame cap (e.g., 60 → 30). If performance stays stable longer and the device stays cooler, throttling was likely involved.
  • Practical interpretation: If lowering resolution doesn’t prevent the long-run drop, you might be CPU/thermal limited; if lowering frame cap helps a lot, you were likely running too “hot” per second.

Designing for thermal headroom

Thermal headroom means not running the CPU/GPU at maximum continuously. A game that uses 70–80% of the device’s sustained capability often feels better long-term than one that peaks at 100% and then throttles.

  • Practical steps: Cap FPS, reduce heavy post-processing, and scale effects dynamically based on measured frame time trends.

5) Optimization priorities: fix the biggest bottleneck first (with measurable metrics)

The optimization loop

Optimization is a measurement-driven loop. The goal is not “make everything faster,” but “remove the dominant limiter to hit a stable target with headroom.”

  1. Define the target: e.g., 60 FPS sustained for 15 minutes on mid-tier devices, or 30 FPS on low-end.
  2. Measure baseline: capture CPU frame time, GPU frame time, memory usage, allocation rate, and hitch counts in a representative scenario.
  3. Identify the biggest bottleneck: the component consuming the most time or causing the worst spikes.
  4. Apply one change: a single optimization with a clear hypothesis.
  5. Re-measure: compare before/after with the same test path and duration.
  6. Repeat: stop when you meet the target with headroom.

How to choose the “biggest bottleneck”

If you see...Likely bottleneckFirst actions
CPU frame time > GPU frame timeCPU-boundReduce per-frame logic, lower physics cost, reduce allocations, simplify AI
GPU frame time > CPU frame timeGPU-boundReduce resolution/effects, cut overdraw, simplify shaders, reduce transparency
Mostly fine but periodic big spikesStability issueFix GC allocations, move loads off critical moments, prewarm/stream assets
Performance degrades over minutesThermal throttlingLower sustained load: cap FPS, reduce heavy passes, add dynamic quality scaling
Crashes or OS kills appMemory pressureReduce peak memory, stream/unload, compress textures/audio, cap caches

Example: a measurable before/after optimization (template)

Use a small report format so improvements are objective and repeatable.

Scenario: “Arena fight, 30 enemies, 5 minutes loop” on Device X Target: 60 FPS (16.67 ms) Baseline: CPU 14 ms avg, GPU 22 ms avg, 0.5% frames > 33 ms, device warms quickly Hypothesis: GPU-bound due to overdraw + post-processing Change: Disable bloom + reduce particle transparency layers After: CPU 14 ms avg, GPU 15 ms avg, 0.1% frames > 33 ms, slower temperature rise Next: Reintroduce a cheaper bloom or add dynamic quality scaling

Step-by-step: applying “fix the biggest bottleneck first” in practice

  • Step 1: Pick one representative device tier (mid-tier is a good baseline) and one repeatable scene.
  • Step 2: Determine bound type by comparing CPU vs GPU frame time and by testing resolution scaling (if lowering resolution helps a lot, you were likely GPU-limited).
  • Step 3: Address the dominant cost category
    • If GPU-bound: reduce overdraw, simplify shaders, cut full-screen passes, reduce render scale.
    • If CPU-bound: reduce simulation frequency, optimize hot loops, reduce object counts, pool objects, reduce allocations.
    • If spike-bound: eliminate allocations, prewarm shaders, schedule streaming away from combat.
  • Step 4: Validate with metrics (average frame time, 95th/99th percentile frame time, hitch count, peak memory, allocation rate).
  • Step 5: Re-test for thermals by running longer sessions; ensure performance does not degrade significantly over time.

Now answer the exercise about the content:

A mobile game runs smoothly at first, then becomes choppy after a few minutes in the same scene. Which explanation best fits this pattern?

You are right! Congratulations, now go to the next page

You missed! Try again.

With sustained load, the device heats up and the OS may reduce CPU/GPU frequencies to cool down. This can make performance degrade over minutes even if the scene and code don’t change.

Next chapter

Asset Optimization for Mobile Games: Size, Memory, and Quality Trade-offs

Arrow Right Icon
Download the app to earn free Certification and listen to the courses in the background, even with the screen off.