10 Block Puzzle Devlog: Technical Challenges Hidden in Simplicity

In early 2024 I wanted to build a game that “anyone can enjoy easily, yet still has depth.” The result was 10 Block Puzzle. In this post I share the technical decisions behind this simple-looking number puzzle and what I learned during development.

Project background

While analyzing the mobile games market I found something interesting: simple puzzle games often have higher retention than complex RPGs or strategy titles. Games like Candy Crush and 2048 stay near the top for years for this reason.

I started with a very simple rule: find numbers that sum to 10. But implementing that simplicity was anything but simple.

Key technical challenge 1: real-time combination verification algorithm

The core of the game is verifying in real time whether the sum of the blocks a player selects equals exactly 10. At first I implemented it with straightforward loops, but I hit performance issues on an 8×8 board.

JavaScript
// Initial implementation - O(n^2) complexity
function checkCombination(selected) {
    let sum = 0;
    for (let block of selected) {
        sum += block.value;
    }
    return sum === 10;
}
// Optimized implementation - real-time sum tracking
class GameBoard {
    constructor() {
        this.currentSum = 0;
        this.selected = new Set();
    }
    toggleBlock(block) {
        if (this else {
            this.selected.add(block.id);
            this.currentSum += block.value;
        }
        return this.currentSum === 10;
    }
}

This optimization reduced verification time to O(1) and noticeably improved touch responsiveness.

Key technical challenge 2: fair board generation

Placing numbers completely at random can produce “unsolvable boards.” To prevent that I implemented a reverse-generation algorithm.

  1. Pre-generate valid combinations that sum to 10
  2. Place those combinations onto the board
  3. Fill remaining cells with random numbers
  4. Final validation to ensure at least N solutions exist

With this approach I could guarantee that every generated board is 100% solvable.

Key technical challenge 3: difficulty balancing in Time Attack mode

Balancing difficulty in a time-limited mode is delicate. Too easy is boring; too hard pushes players away.

I implemented a Dynamic Difficulty Adjustment (DDA) system:

  • Track players’ average clear times
  • Monitor streaks of successes/failures
  • Adjust next stage’s board size and time limits based on that data

The result is that both beginners and experts feel an appropriate level of challenge.

Global leaderboard implementation: using Redis Sorted Set

I used Redis Sorted Set to rank players’ scores in real time, because a relational DB struggled to sort scores for tens of thousands of concurrent players.

Bash
// Score insertion (O(log N) complexity)
ZADD weekly_leaderboard 15000 "user:abc123"
// Fetch top 100
ZREVRANGE weekly_leaderboard 0 99 WITHSCORES
// Fetch a specific user's rank
ZREVRANK weekly_leaderboard "user:abc123"

The weekly leaderboard resets automatically every Monday, while all-time best scores are stored permanently.

Results and lessons learned

Within three months of launch the game reached 100,000 downloads, and average session length was 8 minutes, exceeding my target. Day-7 retention relative to DAU was 35%.

Key lessons from this project:

  1. Simplicity is not easy – simple UX often requires complex engineering behind the scenes
  2. Fairness is trust – players stay when they believe the game is fair
  3. Data-driven balancing – player data beats intuition for tuning difficulty

Download and feedback

10 Block Puzzle is available for free on Google Play. As the developer, I value player feedback — please leave a review after playing and I’ll consider it for future updates.