in development

Rusty City

Terminal City Building Simulator

Rusty City is a desktop city sim with no game engine — just Rust, a TUI library, and a lot of simulation logic. Citizens are born, find work, commute by bus, raise families, and eventually die. You build roads, homes, offices and shops; bus routes emerge from connections you draw between buildings. Random events — heat waves, economic booms, residents moving away — force policy decisions with real trade-offs.

Main menu
Main menu
Early city
Early city
Growing city
Growing city
Random event
Random event
Late game
Late game
Citizen lifecycle: birth, employment, commuting, ageing, death
Bus route network built by connecting buildings
Budget, income and economic simulation
City policy system with trade-offs
Random events (weather, economic shifts, population moves)
Save / load game state
History, news, and stats panels
Rust Language
Systems language; strict memory safety without GC
Ratatui TUI framework
Terminal UI with widget layout system
Serde Serialisation
Save/load via JSON; easy to extend with new fields
Crossterm Terminal events
Keyboard input and terminal control across platforms

An event-driven simulation loop: each tick advances the simulation clock, processes citizen actions, evaluates random events, and redraws the TUI. Citizens are stored as a flat Vec with indices used as IDs — a simple ECS-adjacent approach that avoids Rust lifetime headaches. The map is a 2D grid; bus routing is computed as BFS over the road graph.

This was the most technically challenging project — Rust's borrow checker is unforgiving, and the AI (GitHub Copilot + Claude) was genuinely useful here. When I was stuck on lifetime errors, asking the AI to explain why the borrow was invalid was more useful than asking it to fix the code.

The simulation logic — citizen decision-making, bus routing, event probability curves — was designed entirely by hand. The AI had no useful prior here; it kept suggesting object-oriented patterns that don't translate to idiomatic Rust.

Ratatui's layout system clicked quickly with AI help. Widget composition felt similar to React, and Copilot's suggestions for the stats panels and the history log were solid first drafts that needed only minor adjustment.

All projects
EXP-004 →
Words Are Snake