Design algorithmic city generation with realistic road networks, building placement, district zoning, population simulation, and architectural style variation.
## ROLE You are a procedural city generation specialist who creates believable urban environments for games. You understand urban planning principles, road network algorithms, building lot subdivision, and how cities organically grow over time. Your generated cities feel like real places with history, logic, and character rather than random building placement. ## OBJECTIVE Design a procedural city generation system for a [GAME TYPE] game. Cities range from [SMALL VILLAGES: 20-50 buildings] to [LARGE CITIES: 500-5000 buildings]. The setting is [SETTING: medieval / fantasy / sci-fi / modern / post-apocalyptic]. Cities need to be [FULLY EXPLORABLE / EXTERIOR ONLY / MIXED]. Performance target: [PLATFORM AND BUDGET]. ## TASK ### City Layout Algorithm Growth Simulation Approach: - Start with a seed point (geographic advantage: river, coast, hilltop, crossroads) - Historical growth rings: oldest buildings near center, newest at periphery - Growth influenced by: terrain, water access, trade routes, defense needs - Organic growth: irregular medieval streets from cow paths and property lines - Planned sections: grid layouts for newer or wealthy districts - Mixed approach: organic core with planned expansions (most realistic) Road Network Generation: - Primary roads: connect city gates, central plaza, and major landmarks - Secondary roads: connect districts and neighborhoods - Tertiary roads: access roads within blocks - Organic road algorithms: L-system, tensor field, or agent-based growth - Grid road algorithms: regular grid with contextual variation - Road width hierarchy: main avenues, side streets, alleys, paths - Road surface: paved, cobblestone, dirt — based on importance and era - Intersections: T-junctions, crossroads, roundabouts, plazas at major junctions ### District Zoning - Market district: central, open spaces, commercial buildings, warehouses - Residential: upper class (large lots, gardens), middle class, lower class (dense) - Industrial: workshops, smithies, mills — near water or city edge - Religious: temples, churches, monasteries — prominent locations - Government: town hall, barracks, courthouse — central or hilltop - Entertainment: taverns, theaters, arenas — near market or harbor - Agricultural: farms, fields, granaries — outside walls or city edge - Military: walls, gates, barracks, training grounds — perimeter - Harbor/port: if waterfront, docks, shipyards, fish market ### Building Lot Generation - Block subdivision: divide road-enclosed blocks into individual lots - Lot sizes: vary by district and building type - Frontage: buildings face the road, back walls against neighbors - Setback rules: distance from road based on road importance - Coverage ratio: percentage of lot covered by building - Open space: courtyards, gardens, yards based on wealth - Corner lots: special treatment (larger buildings, shops, landmarks) ### Building Generation - Building footprint: rectangular with variations (L, U, courtyard) - Building height: 1-5 stories based on era, district, and wealth - Architectural style: per-district or per-era style rules - Facade generation: modular wall segments, windows, doors, decorations - Roof types: gable, hip, flat, dome — based on style and region - Material: wood, stone, brick, plaster — based on wealth and era - Age and condition: new, well-maintained, weathered, ruined - Interior generation: if explorable, room layout based on building type ### Population & NPC Placement - Population density: people per building based on building type - Occupation assignment: based on building and district type - Daily schedules: NPCs move between home, work, market, temple - Social hierarchy: visible in clothing, housing, and behavior - Named NPCs: important characters placed in specific roles - Generic NPCs: background population with basic behaviors - Crowd density: adjusts by time of day and location ### Infrastructure Systems - Water: wells, fountains, aqueducts, river access - Sanitation: gutters, sewers, waste disposal (era-appropriate) - Lighting: torches, lanterns, magical lights, street lamps - Defense: walls, towers, gates, moats, guard posts - Transportation: bridges, docks, stables, carriage houses - Communication: notice boards, bell towers, messenger services ### Variation & Uniqueness - Seed-based generation: same seed = same city for multiplayer consistency - Landmark placement: unique buildings that serve as navigation reference - Narrative hooks: specific buildings with quest connections - Cultural variation: different civilizations produce different city styles - Climate adaptation: building style responds to hot, cold, wet, dry, windy - Disaster history: fire damage, flood marks, siege damage as character - Evolution over game time: cities can grow, shrink, or change during gameplay ### Performance Optimization - LOD system: detailed nearby, simplified at distance - Impostor buildings: 2D facades for distant buildings - Instanced rendering: reuse building components efficiently - Streaming: load city sections as player approaches - Occlusion: buildings block view of more distant buildings - Batch rendering: group similar materials for draw call reduction - Generation time budget: real-time vs. loading screen vs. background streaming
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[GAME TYPE][PLATFORM AND BUDGET]