Quantenficus is a browser-based idle/incremental game: players grow a “quantum ficus,” clicking produces leaves, upgrades produce passive income, and a two-tier prestige system unlocks meta-progression. A classic genre pattern, with its own feature set of boss fights, a spore exchange, symbionts, a greenhouse, and artifacts.
Gallery
Case Study
Situation
An idle game as a side project — with the goal of not just copying the genre, but cleanly solving its usual technical pitfalls.
Challenge
Numbers in an idle game grow exponentially past the safe range of IEEE-754 doubles. Solved with a custom 33-tier suffix table with a fallback to scientific notation, NaN/Infinity guards, and a custom JSON replacer/reviver that serializes numbers beyond Number.MAX_SAFE_INTEGER as tagged strings, to avoid precision loss when saving to localStorage and Supabase. The second problem: offline-progress calculation — the timestamp delta since the last save, capped, with multipliers from unlocked research and a minimum threshold below which it doesn’t kick in at all.
Approach
React 18.3 with TypeScript 5.5, Vite as the build tool, the Vite PWA plugin for offline capability. No external state management — the entire game state lives in a single custom hook. Persistence in two tiers: synchronous to localStorage on every state change, optionally also via Supabase with periodic cloud sync.
Decisions
Full control over German number formatting and a custom suffix table instead of an off-the-shelf library.
The entire game state lives in a single custom hook — a deliberate choice to skip Redux/Zustand at this scale.
Conflicts are resolved in favor of the higher total progress, to avoid data loss with multi-device use.
The offline calculation stays independent of parsing the rest of the game state.
Old save files keep loading reliably, even without an explicit version field.
My contribution
Complete game logic, the big-number system, the offline-progress calculation, the cloud-sync hook, the PWA configuration, the Supabase schema, plus the deploy pipeline and error monitoring.
Results