Procedural City Simulator
Build sprawling metropolises with realistic traffic, dynamic economies, and day/night cycles that feel alive. Written in Rust on the Bevy engine for the kind of performance that lets a city breathe.
Last updated: April 11, 2026
Notes from the drafting table
The first-person camera looked great, but from isometric every building was a
flat-colored prism with a bright-cardboard top. We traced why FPV worked (POM,
interior mapping, SSAO all active at close range) and mapped that diagnosis
onto a structured fix: in-shader per-instance weathering, a dedicated
procedural RoofMaterial, and a coverage expansion pass that
chased down rowhouses, commercial crown tiers, and multi-tier industrial bodies.
Ripped out the entire procedural generation pipeline and rebuilt the terrain system from scratch. 5 noise layers, 6 map layouts (Rolling Hills, Coastal Shore, River Valley, Island, Plateaus), auto-textured terrain shader, Gerstner wave ocean, and a HeightfieldCache that eliminated 200ms stutter spikes by replacing 27 Perlin evaluations per vertex with O(1) bilinear lookups.
Read the full entry →A 4-week sprint to push visuals from tech demo to cinematic. Procedural sky atmosphere with Rayleigh/Mie scattering, first-person walk camera, 9-layer asphalt shader, profile-extruded vehicles (12 types), stylized "peg people" pedestrians with per-pedestrian material variation, and a full post-processing pass with SSAO, film grain, vignette, and auto-exposure.
Read the full entry →Screenshots from the city
What the city is made of
Tensor field algorithms produce organic road networks and realistic urban layouts. Every city is unique. 6 terrain layouts from flat plains to coastal shores and island chains.
Full creative control with zone painting, road drawing, and service placement. Shape your city lot by lot, or let demand drive growth.
Nagel-Schreckenberg cellular automata with intersection right-of-way, stop signs, turn yielding, accidents, and congestion visualization. 12 vehicle types including semi-trucks and motorcycles.
RCI demand, land values, employment, population dynamics, tax income, maintenance budgets, and building lifecycle from construction through aging to abandonment.
Dynamic sun with seasonal variations. Watch golden hour wash over your skyline as 5,000+ lights switch on: street lamps, traffic lights, windows, neon signs, rooftop beacons.
Clear, fog, rain, and storms cycle dynamically. Wet surfaces pick up sky reflections via Schlick Fresnel. Volumetric fog produces god rays at dawn and dusk.
4 custom WGSL material shaders: 9-layer asphalt, concrete sidewalks, MUTCD-compliant road markings with paint wear, and metallic-flake vehicle paint with clearcoat.
6 sub-types: Warehouse, Factory, Refinery, Workshop, Logistics, PowerUtility. Sawtooth roofs, smokestacks, storage tanks, loading docks, shipping containers, chain-link fencing.
Stadiums, train stations, clock towers, skyscrapers. Interior mapping for windows. Balconies, awnings, neon signs, rooftop AC units, water towers, and construction cranes.
Smooth continuous bodies via 7-10 cross-section profiles per type. Sedans, SUVs, hatchbacks, sports cars, vans, buses, semi-trucks with tractor-trailer, and motorcycles in riding formation.
128-byte hardware instancing, 16×9×24 clustered shading for 5,000+ dynamic lights, cascaded shadow maps, and Bevy 0.18's built-in frustum and occlusion culling.
250m chunk streaming with camera-driven load/unload, entity pooling, and a 1 Hz macro simulation for dormant chunks so city-wide economics stay accurate at any map scale.
Technical foundation
Bevy ECS with Rust's zero-cost abstractions. No garbage collection, no virtual dispatch on hot paths, automatic parallel system scheduling.
128-byte instance data renders 100,000+ unique buildings with minimal draw calls. Shared mesh and material pools keep GPU memory efficient.
16×9×24 cluster grid manages 5,000+ dynamic point lights across street lamps, traffic lights, windows, neon, and rooftop beacons.
Road networks generated by tracing streamlines through blended grid and radial tensor basis fields (Chen et al. 2008).
Why Rust and Bevy instead of Unity or Unreal
All game logic lives in systems that query entities with specific components. Data-oriented design enables cache-friendly iteration over 100,000+ buildings without virtual dispatch or scattered heap allocations. 20+ visual systems run concurrently via Bevy's automatic scheduler.
The simulation runs at a fixed 20 Hz tick rate, decoupled from rendering. RCI demand, population, traffic, economy, land value, service coverage, and building aging all run on their own cadence without blocking the GPU. A 1 Hz macro simulation keeps dormant chunks economically active so whole-city stats stay accurate regardless of camera position.
Megastructures emerge as your city grows
Massive procedural megastructures that emerge organically when demand and city scale reach critical thresholds. True endgame content for sprawling metropolises.
Population-based thresholds
| 250K pop | 6×6 zones | 250m+ |
| 500K pop | 7×7 zones | 300m+ |
| 750K pop | 8×8 zones | 350m+ |
| 1M pop | 9×9 zones | 400m+ |
Job-based thresholds
| 50K jobs | 10×10 zones |
| 100K jobs | 12×12 zones |
| 150K+ jobs | 14×14 zones |
Progress toward v1.0
Procedural generation, sandbox mode, basic simulation, save/load system.
[x] CompleteSeasonal variations, weather system, landmarks, traffic simulation, color grading.
[x] CompleteIndustrial sub-types, commercial details, smoke overhaul, outdoor props, terrain-aware parks, density-aware building visuals.
[x] CompleteProcedural asphalt/sidewalk/marking shaders, profile-extruded vehicles (12 types incl. semi-trucks & motorcycles), road crown geometry, vehicle paint materials, bus variants, stylized "peg people" pedestrians, house variety (6 styles, garages, yards), high-density residential crowns, construction cranes, first-person camera mode.
[x] CompleteAAA terrain refactor (multi-layer heightfield, 6 map layouts, auto-textured shader, water overhaul), and the building visual pass: in-shader weathering (per-instance jitter, drip streaks, top-edge shadow, north grime, archetype-aware roof darkening), procedural RoofMaterial with tar/membrane base, gravel speckle, weather stains, seam lines, equipment scuff zones, wet sky reflections during rain, and winter snow accumulation.
Ambient soundscape, UI sounds, screen-space reflections, quality presets, simulation balance pass.
PlannedFull feature set, tutorials, documentation, final polish.
FutureEarly access coming soon
Windows 10/11 (64-bit)
Ubuntu 20.04+ / SteamOS
macOS 12+ (Apple Silicon)
================================================================================ URBAN SPRAWL — CHANGELOG ================================================================================ [v0.9.0] - April 2026 (IN PROGRESS) -------------------------------------------------------------------------------- >> Building Visual Pass: Weathering & Procedural Roofs [+] In-shader per-fragment weathering on building bodies [+] Per-instance color jitter (+/-8% brightness, warm/cool hue shift) seeded by lot index — adjacent buildings never identical [+] Vertical drip streaks, facade-type-aware (porous surfaces streak more) [+] Top-edge water shadow band under parapets [+] North-side grime accumulation (algae/pollution) [+] Archetype-aware roof darkening with gravel speckle, membrane seams, industrial corrugation ribs [+] Procedural RoofMaterial extended material for flat roof caps [+] Tar/membrane base, gravel speckle, weather stains, sun-bleached patches, membrane seams every 3.5m, equipment scuff zones [+] Wet response: Schlick Fresnel sky reflection, animated rain ripples [+] Winter snow accumulation with drift variation and heat-loss melt zones [+] Shared RoofMaterialPalette resource — 18 pre-built materials [+] Coverage expansion: rowhouses, commercial crowns, industrial bodies [*] Fixed petgraph swap-remove desync in RoadGraph::remove_node [*] Wrapped TiltShiftConfig in Option for dev panel safety -------------------------------------------------------------------------------- >> AAA Terrain Refactor [+] Multi-Layer Heightfield — 5 noise layers with geographic features [+] 6 Map Layouts — Flat, Rolling Hills, Coastal Shore, River Valley, Island, Plateaus [+] Auto-Textured Terrain Shader — height+slope blending [+] Water Overhaul — Gerstner wave ocean + river strip meshes [+] HeightfieldCache — O(1) bilinear lookups replacing 27 Perlin evals [+] Spatial-Indexed Terrain Mods — 50m-cell HashMap [*] Terrain resolution 1000 to 500 (4x fewer vertices, no quality loss) [*] Fixed WGSL smoothstep UB causing brown terrain [-] Deleted entire src/procgen/ directory (14 files) — sandbox only -------------------------------------------------------------------------------- [v0.8.0] - March 2026 [COMPLETE] -------------------------------------------------------------------------------- >> Road & Surface Shaders [+] Procedural Asphalt Shader — 9 detail layers [+] Sidewalk Shader — concrete panels with joints, grain, staining [+] Road Marking Shader — MUTCD-compliant thermoplastic paint [+] Road Crown Geometry — 5-vertex parabolic cross-section >> Vehicle Overhaul [+] Profile-Extruded Bodies — 7-10 cross-section profiles per type [+] 12 Vehicle Types — Sedan, SUV, Truck, Van, Bus, SportsCar, Hatchback, SemiTruck (16m tractor-trailer), Motorcycle [+] Vehicle Paint Shader — metallic flake, clearcoat Fresnel [+] Semi-Trucks — cab + trailer with corrugated ribs [+] Motorcycles — narrow body with rider, 30% group formation [+] 4 Bus Variants — CityTransit, Express, SchoolBus, Shuttle >> Pedestrian Visual Overhaul [+] Stylized "Peg People" — lathe-revolved chess-pawn bodies [+] Per-pedestrian material variation — clothing + skin colors >> Residential Variety [+] 6 House Styles — Colonial, Craftsman, Victorian, Modern, Mediterranean, FarmHouse [+] Garages, driveways, suburban yards, fences, mailboxes [+] High-Density Crowns — Art Deco, Dome, Peaked, Spire [+] First-Person Camera (F1) [+] Construction Cranes for 120m+ buildings -------------------------------------------------------------------------------- [v0.7.0] - February 2026 [COMPLETE] -------------------------------------------------------------------------------- >> Industrial Sub-Type Differentiation [+] 6 Industrial Sub-Types with unique shapes and details [+] Building-Mounted Props — ducts, staircases, awnings, dishes [+] Outdoor Props — containers, dumpsters, fencing, transformers [+] Sub-Type Night Lighting — 6 unique profiles >> Smoke & Particle Effects [+] Multi-Plane Billboard Smoke — 3 intersecting quads per emitter [+] Three Smoke Types, Wind Integration, 4-Tier LOD >> Commercial Architectural Details [+] 7 Detail Types — parapets, penthouses, cornices, spires -------------------------------------------------------------------------------- [v0.6.0] - January 2026 [COMPLETE] -------------------------------------------------------------------------------- [+] Seasonal Variations — Spring, Summer, Fall, Winter [+] Complete Landmark Set — clock towers, churches, stadiums [+] Traffic Simulation — Nagel-Schreckenberg CA model [+] Economic System — zone demand, land values, employment [+] Post-Processing — tilt-shift, grain, SSAO, bloom -------------------------------------------------------------------------------- [v0.5.0] - December 2025 [COMPLETE] -------------------------------------------------------------------------------- [+] Procedural city generation with tensor fields [+] Sandbox mode with zone painting [+] Day/night cycle with weather system [+] Save/load system [+] GPU-driven rendering with instancing [+] Clustered shading for 5,000+ lights ================================================================================ > EOF ================================================================================