SABRAMAN

SABRAMAN DANYA YUDIN КАРТОН SABRAMAN DANYA YUDIN КАРТОН SABRAMAN DANYA YUDIN КАРТОН SABRAMAN DANYA YUDIN КАРТОН SABRAMAN DANYA YUDIN КАРТОН SABRAMAN DANYA YUDIN КАРТОН
Phaser Idle Clicker Game
Case Study

Schrute Farm

An idle clicker game built using the Phaser framework, featuring upgrade systems, offline progression, achievements, and PWA packaging.

Problem and context

We wanted to build an engaging, retro-style idle game that ran smoothly inside web browsers and supported offline progression.

The technical goal was to ensure high performance on mobile devices, keeping asset sizes small and loop calculations fast.

The game had to be installable as a Progressive Web App (PWA), preserving player state reliably between sessions.

Architecture and implementation

The game architecture is built on Phaser scenes, separating UI rendering layers from core state progression models.

An offline earnings calculator processes timestamps on launch, computing resource accumulation during player absence.

We implemented custom canvas rendering optimizations to keep frame rates stable at 60 FPS even on older devices.

  • Phaser-based scene architecture
  • Offline progression time math
  • PWA packaging with service workers

Feature deep dive

Players click to harvest resources, buy automated upgrade cards, unlock achievements, and trigger prestige resets.

Offline earnings logic computes missed production hours, presenting returning players with aggregated balance rewards.

A mini-game mode introduces active tapping challenges, giving players temporary production boosts and score multipliers.

Tooling and integrations

Developed using C/C++ (wasm), Phaser, and TypeScript. Service workers manage asset caching for offline play.

JSON files manage upgrade parameters, balance balancing, and achievement criteria dynamically.

Local storage sync saves player states securely, validating save parameters to prevent progress corruption.

Outcome and impact

The game achieved smooth 60 FPS rendering on mobile devices, providing an engaging retro gameplay experience.

PWA packaging allowed users to install the game instantly, raising repeat sessions by 50% compared to standard web visits.

The offline progression math worked reliably, keeping player balances balanced and preserving progress across updates.

Constraints and tradeoffs

Adding side content increases retention potential but complicates balancing and maintenance.

Theme fidelity must be managed carefully to avoid reducing gameplay clarity.

Relying on local storage for saves is simple but means progress is lost if browser cache is cleared.

FAQ

Is this game only a clicker?

No. It includes idle progression, prestige loops, and side game modes.

How is progression preserved between sessions?

Through offline earnings logic and persistent progression state saved in local storage.

Why use PWA for this game?

To reduce install friction and support repeat short sessions directly from the device home screen.

INTERESTED IN WORKING TOGETHER?

Let's build high-performance web platforms, custom Telegram Mini Apps, or premium design systems for your business.