DEV Community

Cover image for I Built a Playable Life Sim That Reveals Your Real Climate Impact at the End
Ibrahim Awab
Ibrahim Awab

Posted on

I Built a Playable Life Sim That Reveals Your Real Climate Impact at the End

DEV Weekend Challenge: Earth Day

This is a submission for Weekend Challenge: Earth Day Edition

Earth Day Edition — Earth Impact

What I Built

Most climate apps show you a number.

Earth Impact makes you live one.

It’s a BitLife-style life simulation where you start at age 18 and move through an ordinary life: choosing a career, buying a car, booking flights, investing money, starting a family, upgrading your home. At first, it feels like a normal decision game. Nothing about it feels like an environmental tool.

That’s intentional.

The environmental cost is hidden during play, then revealed at the end.

When the life finishes, the game translates your choices into their real-world consequences: not just tons of CO2, but heat, displacement, harvest loss, water scarcity, habitat collapse, and indirect deaths tied to the cumulative weight of a lifetime. The ending is designed to feel less like a scoreboard and more like a receipt.

The goal wasn’t to lecture. It was to make the player pause.

Demo

Code

How I Built It

I structured the project so the core simulation stays fast and deterministic, while AI is used only where it adds value.

Local-first gameplay

Most of the game runs locally. A reducer drives the state machine, so the player’s life progression is predictable and easy to reason about. The game keeps track of age, health, money, reputation, risk, active memories, current scenario, and environmental totals through a central GameState.

A local rarity engine decides which years should trigger meaningful events. Each year can fall into one of several tiers — common, uncommon, rare, epic, legendary, or skip. Skip years still matter: they apply passive environmental and economic drift locally, without making an API call.

That means the game can simulate a full life while only reaching out to Backboard when it has something meaningful to ask.

Smarter scenario generation

Rather than sending an open-ended prompt every time, the game decides the scenario category before the request goes out. That keeps the AI brief narrow and concrete.

The result is a more grounded system:

  • fewer repetitive prompts,
  • more relevant life events,
  • better pacing across the player’s lifespan,
  • and less unnecessary API usage.

I also added memory and anti-repeat logic so the game doesn’t keep asking the same kinds of questions. If the player already bought a car, married, had children, or made a major purchase, future scenarios can respond to that history instead of ignoring it.

Prefetching and responsiveness

To keep the game feeling immediate, the next scenario is prefetched in the background as soon as the player makes a choice.

That means the game doesn’t sit and wait after every action. By the time the result is read, the next branch is often already ready.

This makes a bigger difference than it sounds like. It keeps the experience from feeling like “request → loading → request → loading” and makes it feel more like a continuous life unfolding.

Final summary system

The ending is where the game becomes more than a life sim.

I built a reference layer of climate and ecological context so the final summary could translate numbers into human-scale consequences. Instead of saying:

  • “you emitted X tons of CO2,”
  • “you used Y litres of water,”
  • “you cleared Z hectares of forest,”

the final panel turns those into:

  • heat in a specific region,
  • thirst for a specific community,
  • forest loss tied to named ecosystems,
  • and indirect deaths grounded in statistical reality.

That made the ending much more emotionally readable. The player doesn’t just see impact; they feel scale, place, and consequence.

Backboard integration

Backboard powers the generative parts of the experience:

  • origin creation,
  • scenario generation,
  • chapter summaries,
  • and the final reflection.

The AI is never asked to invent the game’s facts from scratch. It receives structured state, impact data, and a tightly scoped prompt. That keeps the narrative grounded while still letting Backboard shape tone and phrasing.

In other words: the game decides the facts, Backboard helps tell the story.

What I Learned

This project ended up being less about “building a climate game” and more about translating abstract data into something emotionally legible.

A few things stood out:

  • numbers alone are easy to ignore,
  • place matters more than scale,
  • specific human consequences land harder than generic comparisons,
  • and pacing matters just as much as writing.

The biggest challenge was finding the balance between being truthful and being readable. I didn’t want the ending to feel like a lecture or a guilt trip. I wanted it to feel like a quiet final reveal.

Prize Categories

Best Use of Backboard

Closing Thought

Earth Impact is about the gap between how a decision feels in the moment and what it costs over a lifetime.

At first, it’s just a game about choices.

At the end, it’s a game about consequences.

Top comments (0)