Inspiration

Disaster movies always have that heart-in-your-throat moment: a car is crossing a mountain pass when suddenly an earthquake or landslide strikes, shattering both sides of the bridge and trapping the driver on a lone, precariously balanced slab over the canyon.

We wanted to capture that exact survival dilemma in a game. In Drive Don't Crash: Car Balance, you don’t get to race to the other side—the bridge has collapsed beneath you. You are stranded on a central pillar, the broken bridge plank tilts like a giant seesaw under your car's weight, and aftershocks send boulders crashing down from the mountains above. We set out to turn this disaster premise into a pure physics survival challenge, powered by a seamless, transparent monetization model built on RevenueCat.

What it does

Drive Don't Crash: Car Balance places players in the cockpit of a stranded car fighting for survival in the aftermath of a catastrophic bridge collapse:

  • The Disaster & The Seesaw Bridge: As the vehicle crosses, a sudden earthquake/landslide destroys both ends of the bridge. The remaining road surface snaps free and balances on a central fulcrum like a volatile seesaw.
  • Survival by Weight Shifting: With the road severed on both sides, the player's only hope is balance. Driving forward tips the plank into a steep downward slope toward the abyss; reversing shifts the mass backwards. Players must continuously counter-steer and balance throttle and reverse to keep the center of mass centered over the pivot.
  • Falling Rock & Debris Hazards: The mountainside above continues to crumble. Rocks, bricks, and heavy boulders plummet from the sky. Direct hits deal catastrophic vehicle damage and exert violent physical impulses that throw off the bridge's delicate equilibrium.
  • Emergency Nitro & Health Refills: Players can trigger Nitro Boosts for instant bursts of torque to crawl back up a steep slide, and consume Health Refills to repair damage sustained from rock impacts.

RevenueCat In-App Purchases, Subscriptions & Ad Monetization:

  • Weekly & Monthly VIP Subscriptions: Completely removes ads and grants a daily supply of Health Refills and Nitro Boosts straight to the player's garage.
  • Nitro & Health Refill Consumable IAPs: Powered directly by RevenueCat (purchaseStoreProduct()) to allow players to instantly purchase multi-pack emergency repairs and rocket boost supplies to survive longer runs.
  • Ad Monetization Tracking via RevenueCat: Integrated Purchases.adTracker to capture live Impression-Level Revenue Data (ILRD) and ad lifecycle metrics directly from AdMob, bridging hybrid monetization (IAP + Ads LTV) seamlessly into RevenueCat analytics.
  • Garage Vehicle Unlocks: In-app purchases for heavy-duty survival vehicles (like the Titan Enforcer and Neon Overlord) with distinct weights, suspension damping, and center-of-gravity stats.
  • RevenueCat Paywall UI: High-converting, native paywalls presented dynamically via RevenueCatUI.presentPaywall().

How we built it

  • Physics & Simulation Engine (Flutter + Flame + Forge2D):
  • Dynamic Bridge Collapse: When disaster hits, the access ramps detach, and the remaining plank (BridgeTopComponent) binds to the central pillar (BridgePoleComponent) via a dynamic RevoluteJoint. The seesaw's motion is governed by continuous torque equilibrium:

$$\sum \tau = I \alpha = \tau_{\text{car}} + \tau_{\text{falling_rocks}} - c \omega$$

  • Dynamic Mass Shifting: Driving forward or backward changes the lever arm $r_{\text{car}}$, directly dictating tilt torque ($\tau_{\text{car}} = r_{\text{car}} \cdot m_{\text{car}} g \cos\theta$) and forcing players to constantly counter-steer.
  • Impulse Impacts: Boulders spawned via RockSpawnerComponent deliver instantaneous linear impulses upon impact ($J = \Delta p = \int F \, dt$), violently displacing the plank's delicate balance.

  • RevenueCat Monetization Stack:

  • Handled through a centralized RevenueCatManager listening to real-time CustomerInfo state.

  • Entitlement: drive_don_t_crash_pro unlocking VIP benefits.

  • Store products (Weekly/Monthly subscriptions, Nitro packs, Health refills, and vehicle unlocks) queried dynamically for localized pricing on Google Play.

  • Persistence & Backend:

  • Anti-cheat daily allowance tracking powered by a synchronized ServerTime clock to prevent local clock tampering.

  • Frictionless Auth & Leaderboards: Firebase Anonymous Auth provides instant, zero-friction onboarding so players jump straight into gameplay, while optional Google and Apple Sign-In guarantees cloud backup and cross-platform survival leaderboards via Firebase RTDB.

Challenges we ran into

  1. Simulating the Disaster Transition: Transitioning the bridge seamlessly from a traversable road into a free-swinging, broken seesaw plank on a central fulcrum without causing physics body penetration or sudden solver explosions was our biggest challenge. We had to carefully destroy initial sensor fixtures and generate dynamic revolute constraints on the fly.
  2. Rock Impact Physics vs. Playability: Finding the sweet spot for boulder impacts: large rocks needed to feel threatening and exert real physical tilt on the seesaw without instantly flipping the car into an unrecoverable death spiral.
  3. Decoupling Store Events from 60 FPS Physics: Ensuring that RevenueCat product price queries and subscription state checks never paused the continuous Forge2D physics step loop, keeping gameplay buttery smooth even during network stalls.

Accomplishments that we're proud of

  • An Original, Gripping Survival Loop: Moving away from standard distance racers to create a white-knuckle balance-or-fall disaster survival game.
  • Tactile Physics Feel: The mechanical feel of tires spinning against a steep steel plank as boulders rain down around you.
  • Unified LTV Engine: Connecting RevenueCat Ads to capture Impression-Level Revenue Data (ILRD), bridging ad mediation metrics and in-app purchase revenue into a single cohort lifetime value stream.
  • Full-Stack RevenueCat Integration: Subscriptions, consumables, non-consumable vehicle unlocks, native paywalls, and Customer Center working harmoniously.

What we learned

  • Tuning Rigid-Body Physics for Game Feel: Working with Flutter, Flame, and Forge2D taught us that realistic math doesn't always equal fun gameplay. Raw physics can feel unforgiving; finding the right balance required tweaking rotational damping, friction multipliers, and angular impulse caps to ensure falling rocks feel dangerous without causing unavoidable, cheap deaths.
  • Asynchronous Loop Decoupling in Flutter: Keeping physics rendering locked at a smooth $60\text{ fps}$ while orchestrating network-bound services (Firebase leaderboards, anti-cheat clock syncs, and store queries) required a strict reactive architecture so network delays never introduce frame drops or physics stutter.
  • RevenueCat accelerates game monetization: Managing multiple product categories (consumable nitro/health, non-consumable car unlocks, and recurring VIP subscriptions) through a single clean SDK eliminated weeks of native billing headaches.
  • Unified Ad Telemetry: Tracking ad impressions through RevenueCat Ads alongside core IAPs eliminated the need to cross-reference multiple ad network consoles, providing clear visibility into blended unit economics.
  • Remote Offerings are essential: Being able to configure and swap offerings remotely on RevenueCat without having to push game updates through app store review cycles gives immense power to live-ops.

What's next for Drive Don't Crash: Car Balance

  • Expanding to iOS & Beyond: Leveraging our unified Flutter, Flame, and Firebase stack makes deploying to multiple platforms effortless, with RevenueCat ensuring player purchases, VIP subscriptions, and consumables sync seamlessly across Android and iOS.
  • Paywall A/B Testing via RevenueCat Experiments: Optimizing subscription trial lengths and pricing for global markets.
  • New Vehicle Types: Heavy rescue trucks with massive inertia vs. lightweight agile sports cars with quick balance recovery.

Built With

Share this project:

Updates

Submission history