← BACK_TO_DEVLOG

Battery Saver Mode — When Animated Backgrounds Drain Your Phone

One day after launch, I shipped a quality-of-life feature that makes Shadow Blocks playable on any phone — no matter how old, no matter how hot it gets. Here's how.

The Problem

Shadow Blocks looks gorgeous because every level has a 4K AI-rendered animated background. Eight biomes, eight unique videos looping behind the gameplay. It's atmospheric. It's cinematic. It's also brutal on battery and GPU.

On modern flagships like the Pixel 7a, this isn't a problem. But Android is fragmented. Older devices, budget phones, anything Snapdragon 6-series and below — they all suffer. Heat. Frame drops. Battery dying mid-session.

Within 24 hours of launch, I knew this needed a fix.

The Solution

Replace animated backgrounds with static AI-rendered images when the user opts in. Same biomes, same atmosphere — just no video playback. Result: significant GPU savings, lower temperature, longer battery life.

Three design constraints I set for myself:

  1. Opt-in only. Animated backgrounds are part of the game's identity. Default stays cinematic.
  2. LIVE switch. No room restart, no progress lost. Toggle should work mid-level.
  3. Persistent. Setting saved between sessions.

Architecture

Three files in the GameMaker project handled the heavy lifting:

The core change was in the Draw event of obj_GameManager. Original logic called video_draw() unconditionally. New logic branches:

if (global.low_power_mode == 1) {
    // Static sprite (LPM ON)
    if (sprite_exists(static_bg_sprite)) {
        draw_sprite_stretched(static_bg_sprite, 0, 0, 0, _rw, _rh);
    }
} else {
    // Video (LPM OFF — original logic)
    if (video_path != "") {
        var _vdata = video_draw();
        // ... rest of video rendering
    }
}

The mapping between levels and static sprites was 1:1 with the existing video mapping:

The Hard Part — LIVE Switch

The first instinct is to call room_restart() when the toggle changes. It works. It also wipes the player's level progress. Match-3 puzzles take time. Restarting because someone wanted to save battery is hostile UX.

The fix: handle the switch in real-time without touching the room. When the toggle flips ON:

When the toggle flips OFF, we re-detect the current level, pick the right video file, and reopen it. No room change. No state loss. Zero broken progress.

What I Almost Got Wrong

1. Sprite naming case-sensitivity

Imported the icon, named it spr_batterysaver. Code referenced spr_BatterySaver. GameMaker errored out at runtime. Lost five minutes wondering why. Always copy-paste names.

2. UI layout collision

Adding a new toggle button to the Options screen pushed the X (close) button into the ad banner. Had to refactor the entire spacing system — title moved up to banner_y = 350, gap between items reduced from 80 to 40 pixels.

3. Slash mini-game

Almost forgot Shadow Slash uses its own video background. Had to extend the LPM logic to obj_Slash_Manager too, with a fallback to spr_Slash.

The Result

From idea to deployed in under 3 hours:

v4.1.0 is now LIVE on Google Play. Players who need it can flip the switch. Players who want the cinematic experience get it untouched.

Why This Matters

Mobile games live or die by accessibility. Not "accessible" in the disability sense (although that matters too) — but in the "can you play this on a five-year-old phone in your hand" sense. Not everyone has flagship hardware. Not everyone has unlimited battery time during their commute.

Adding LPM took one morning. The cost is a tiny conditional in the Draw event. The payoff is your game stays playable on a fundamentally larger pool of devices. That's not a feature. That's an obligation for solo indie devs targeting mobile.


PLAY SHADOW BLOCKS v4.1.0
Battery Saver Mode now LIVE. Free on Google Play.
▶ DOWNLOAD NOW