Sims 4 Apocalypse Challenge Engine
Reactive Multi-Branch State Planner with Bidirectional Cloud Synchronization
Engineered a high-complexity progression state engine managing 93-career combinatorics, automatic relay boards, and zero-collision bidirectional synchronization between browser localStorage and a Redis-backed FastAPI backend.
The Engineering Case Study
The Problem
Players tackling complex generational legacy challenges had to manually track hundreds of interdependent restrictions, pack filters, and career completion states across clunky, error-prone spreadsheets. Refreshing the browser or switching devices frequently corrupted progress or lost multi-hour session logs.
How It Was Engineered
The front-end executes an offline-first state machine that records unlocks, household transfers, and rule-set permutations directly into localStorage (`wltg.apocalypse.saves.v2`). In the background, the application polls and reconciles timestamps against a FastAPI microservice running on Cynthia's VPS. User profiles, run states, and historical diffs are persisted to Redis with Append-Only File (AOF) durability (`wltg:runs:{user_id}`).
Engineering Hurdles Solved
Eliminating race conditions and accidental overwrite collisions between mobile devices and desktop sessions when players switch platforms mid-run. Cynthia architected a deterministic vector timestamp reconciliation protocol that merges delta changes rather than blind overwrites, guaranteeing zero progress loss even on intermittent connections.
Business & Production Outcome
Achieved 100% data durability across thousands of recorded challenge runs with zero server crashes. Delivers sub-millisecond local UI interactions while ensuring enterprise-grade cloud durability at near-zero operating overhead.