Free Consultation WhatsApp Us

Case Study

·

2023

Petairu

Engineering a Data-Driven Tile-Matching Puzzle Game With 5-Tier Pet Progression

Cross-platform Unity puzzle game with a NodeJS backend, JSON-based dynamic level system, dual-currency economy, admin-configurable skill trees, multi-tier competitive rankings, and a 5-rarity pet collection system — deployed on iOS and Android with Google Cloud infrastructure.

UnityNodeJSMobile GamePuzzleGoogle Cloud

2

Mobile Platforms

30+

Collectible Pets

3

Game Modes

5

Pet Rarity Tiers

Petairu Tile Matching Pet Puzzle Game

The Challenge

Building a puzzle game that sustains daily engagement beyond the first week

Casual puzzle games face a brutal retention cliff: most players churn within 7 days of install. The core challenge was designing a game engine sophisticated enough to generate fresh content daily, a progression system deep enough to sustain months of play, and a social layer compelling enough to drive organic re-engagement — all while keeping the moment-to-moment gameplay accessible to casual audiences.

1

Stale Content Problem

Traditional puzzle games ship static level packs that players exhaust quickly — leading to sharp retention drop-offs after the first week without fresh content to sustain daily engagement.

2

Flat Progression Curve

Without layered progression mechanics, players hit a ceiling fast. A single reward loop fails to motivate long-term play or encourage monetisation beyond initial installs.

3

Fragmented Social Experience

Players had no way to compare progress with friends or compete regionally — removing the social pressure and community-driven motivation that drives organic retention in casual games.

The Solution

Data-driven game engine with layered progression and live ops

Advisory Apps engineered a three-tier architecture: Unity C# game client → NodeJS REST API → MySQL database on Google Cloud. The backend manages level configuration, player state, economy balancing, leaderboard computation, and push notification scheduling — all configurable through an admin panel without requiring client app updates. Redis handles session caching and real-time leaderboard computation across millions of ranking entries.

System Architecture

The platform uses a layered architecture separating the Unity game client from server-side game logic. All game parameters — level configurations, skill costs, drop rates, event schedules — are server-authoritative, enabling live operations without app store resubmission.

iOS App

Unity • C#

Android App

Unity • C#

REST API
REST API

NodeJS REST API

Game Logic • Auth • Shop Transactions • Leaderboard Queries

REST Endpoints Redis Cache Queue Workers Admin Panel
READ / WRITE

MySQL

Player Data • Transactions

Cloud Storage

Level JSONs • Assets

CDN

Static Assets

API connection
Database read/write
Built by Advisory Apps

Game Session Data Flow

Each game session follows a six-stage pipeline — from mode selection through level loading, tile rendering, match evaluation, and reward distribution. Level configurations are fetched as JSON from the server, allowing daily puzzle rotation without client patches.

1

Step 1

Player Taps Play

Selects game mode; daily puzzle auto-selected for returning players

2

Step 2

Level JSON Loaded

Server delivers level config: tile count, depth layers, shape layout

3

Step 3

Tile Engine Renders

Unity instantiates tile objects across depth layers with type assignments

4

Step 4

Player Matches Tiles

Three matching tiles selected, removed from deck, score updated

5

Step 5

Win/Loss Evaluated

Board clear = win; 7 slots filled = loss; Time Attack checks timer

6

Step 6

Rewards Distributed

Coins, pets, items, mission progress, ranking points awarded

Game Economy & Progression Systems

The game's economy is built on two interlocking systems: a 5-tier pet rarity distribution that controls collection depth, and a progressive reward decay curve that prevents economy inflation while rewarding early engagement.

Pet Rarity Distribution

Probability-weighted unlock system across 5 tiers

Common
40%
Uncommon
25%
Rare
20%
Epic
10%
Legendary
5%

Item Drop Rate Decay

Progressive diminishing returns after consecutive wins

100%
1st
50%
2nd
25%
3rd
12.5%
4th
6.25%
5th
3%
6th+

Pet Tier Comparison Matrix

Tier Drop Rate Skills Tiredness Shop Price
Common
40% 1 None Low
Uncommon
25% 1 12 hrs Medium
Rare
20% 1–2 12–24 hrs High
Epic
10% 1–2 12–24 hrs Very High
Legendary
5% 1–3 12–36 hrs Premium

Player Retention Pipeline

Six interlocking systems designed to deepen engagement at each stage of the player lifecycle

1

Daily Rewards

4-week rotating calendar with escalating prizes

2

Missions

12+ types with multi-tier progression goals

3

Daily Challenges

Unique task-based objectives refreshed every 24 hrs

4

Time Attack

2:30 competitive mode with 4 tile types

5

Special Offers

Starter, Founder, Holiday packs and bundles

6

Social Rankings

Friend, country, and global leaderboards

Deployment Infrastructure

The backend runs on Google Cloud Platform with managed services for database, caching, and storage — minimising operational overhead while maintaining high availability for a global player base.

Mobile Players

iOS • Android

Google Cloud Platform

Cloud Load Balancer

Compute Engine

NodeJS Instances • Auto-scaling

Cloud SQL

MySQL • Player Data

Memorystore

Redis • Queue • Cache

Cloud Storage

Level JSONs • Media

Facebook OAuth

FCM / APNs

App Store / Play Store

GCP managed service
External service

JSON-Based Dynamic Level Engine

A custom Level Designer tool exports tile arrangements as JSON — loaded at runtime so new puzzles deploy without app updates. Daily shape rotation keeps the board layout fresh every 24 hours.

Multi-Layer Pet Progression

Five rarity tiers (Common through Legendary) with per-pet unique skills, leveling requirements, tiredness cooldowns, and admin-configurable stats — creating deep collection and upgrade loops.

Social Rankings & Competitive Loops

Facebook OAuth integration powers friend leaderboards alongside global, monthly, and country-level rankings — with team-based country competitions adding a cooperative dimension.

Implementation Timeline

Phase 1

Core Game Engine

3 months

Phase 2

Economy & Shop

2 months

Phase 3

Social & Rankings

2 months

Phase 4

Retention & Live Ops

3 months

Methodology

Game design document to live operations

Development followed a GDD-first methodology: every mechanic, probability curve, and economy variable was defined in a comprehensive Game Design Document before a single line of code was written. This enabled parallel development of the Unity client and NodeJS backend with shared JSON schema contracts, and allowed the team to tune the live economy through an admin panel without app store resubmissions.

01

Game Design Document

Defined tile-matching mechanics, pet rarity distributions, currency economy, reward curves, and all skill interactions in a comprehensive GDD before writing any code.

02

Parallel Client + Backend

Unity game client and NodeJS API developed concurrently — shared JSON schema contracts ensured level data, player state, and shop transactions integrated seamlessly.

03

Data-Driven Tuning

Admin panel enabled real-time adjustment of drop rates, skill costs, level difficulty, and reward curves without deploying a client update to app stores.

04

Soft Launch & Iterate

Staged regional launch with analytics instrumentation — monitored session length, retention cohorts, and monetisation funnels to tune economy before wide release.

Key Features Delivered

Custom Level Designer Tool

Proprietary editor for arranging 240–450 tiles across 20–40 depth layers, exporting JSON configurations loaded at runtime without client updates.

Dual-Currency Economy

Coins (purchasable via IAP) and Poop (earned through gameplay with 30%/70% drop odds) — each currency gates different skill tiers to balance free and paying player experiences.

Admin-Configurable Skill System

Three free skills (Move Up, Undo, Shuffle) and three premium skills (Peek, Clean Up, Shift) with admin-tunable costs, cooldowns, and availability — plus per-pet unique abilities.

Progressive Reward Algorithm

New pet probability decays from 100% to 50% after 10 acquisitions; item drop rates decay from 100% to 3% after 6 wins — preventing economy inflation while maintaining early excitement.

Multi-Tier Ranking Engine

Global (all-time + monthly), friend (social login), and country (individual + team) leaderboards with Redis-cached ranking computation for sub-100ms response times.

Retention Module Suite

4-week rotating daily rewards, 12+ mission types with multi-tier progression, daily challenges with unique objectives, and Time Attack mode with competitive constraints.

The Results

Measurable impact across game systems

100%

Server-Side Content Control

New levels, events, and balancing changes deploy without requiring app store submissions or client updates.

3

Distinct Game Modes

Standard Daily Puzzle, Time Attack, and Daily Challenge provide varied daily engagement touchpoints.

30+

Collectible Pets Across 5 Tiers

Deep collection system with per-pet unique skills, leveling curves, and rarity-based stat variations.

4

Ranking Dimensions

Global, monthly, friends, and country rankings create competitive loops across different social contexts.

Modules Used

Built with production-ready modules

This project leverages our library of battle-tested modules — each independently scoped, tested, and deployed across multiple client projects.

Conclusion

Technical depth meets casual accessibility

Petairu demonstrates that casual puzzle games can be built on sophisticated engineering foundations without sacrificing accessibility. The JSON-based level engine, dual-currency economy, 5-tier pet progression, and multi-dimensional ranking system combine to create a game that is simple to pick up but deep enough to sustain months of engagement — all driven by a server-authoritative architecture that enables live operations without app store friction.

The admin-configurable approach — where skill costs, drop rates, level configurations, and event schedules are all tunable from a dashboard — transformed the game from a static product into a living platform. Combined with daily content rotation, progressive reward curves, and social ranking pressure, Petairu achieves the retention depth typically reserved for mid-core games while maintaining the one-tap simplicity that casual audiences demand.

Future Outlook

  • Seasonal event framework with time-limited pets and themed level packs
  • Real-time multiplayer puzzle mode with WebSocket-driven synchronisation
  • Machine-learning difficulty adjustment based on individual player performance patterns

Want similar results for your business?

Let's discuss how we can build a custom solution tailored to your needs.

Get a Free Consultation

Need help? Chat with us on WhatsApp for instant support!