overview
An interactive simulation game that models carbon emissions across five Boston neighborhoods. Players race against time to reduce CO2 levels by planting eelgrass and converting car commuters to public transit. The game visualizes how policy decisions and environmental interventions can impact urban carbon footprints, with neighborhoods changing color based on their emission levels.
how to play
visuals
Each neighborhood is color-coded based on its current carbon emission level, creating an intuitive heat map of Boston's environmental health:
neighborhoods
The simulation features five real Boston neighborhoods, positioned according to their approximate geographic locations. Each has different commuter populations based on actual census data:
background
The eelgrass mechanic is based on real research into Blue Carbon ecosystems. Coastal ecosystems like eelgrass beds sequester significant amounts of CO2. According to MIT Sea Grant research, Massachusetts' 218,222 acres of coastal ecosystems sequester approximately 7.5 million metric tonnes of carbon — roughly 34 tonnes per acre.
The emission calculations assume that non-public-transit commuters drive cars, each producing approximately 2.9 tonnes of CO2 annually (based on average commute distances and vehicle efficiency). While simplified, this model demonstrates the real tension between transportation choices and environmental impact.
construction
Built in Racket using the Intermediate Student Language with Lambda (ISL+),
this project uses the big-bang framework for reactive game programming.
The game state is a struct containing the list of neighborhoods and elapsed time,
updated through pure functional transformations on each tick, key press, or mouse click.
Key technical elements:
map and
ormap apply transformations across all neighborhoods efficiently.
place-image
and foldr, layering each onto a base canvas.
on-tick,
on-key, and on-mouse keep concerns cleanly separated.
game loop
The big-bang loop follows a simple cycle: the current world state
(neighborhoods + timer) passes through event handlers (tick/key/mouse), which
return a new state. The draw function renders this state to the screen.
The stop-when clause checks for win (any neighborhood at 0 carbon)
or lose (15+ seconds elapsed) conditions after each update.
Source? This was built as part of Northeastern's Fundamentals of Computer Science I (CS 2500) course. The full Racket source demonstrates functional programming principles applied to interactive simulation.