Skip to content

City Builder Template

City Builder Template — grid-based city simulation

City Builder Template is a complete Blueprint game template for a grid-based city builder. Place roads and buildings, grow population, collect currency from commercial zones, level up your city, and run the simulation at normal or double speed with a day/night cycle.

The project ships as a standalone Unreal 5.8 project (template version 1.7, tested on UE 5.7+). All gameplay lives under Content/CityBuilderTemplate/.

flowchart TB
  subgraph ui [UI]
    WBP_MainMenu
    WBP_PlayerHUD
    WBP_BuildingSelect
    WBP_RoadFrame
  end
  GI[BP_CBT_GameInstance]
  PC[BP_CBT_PlayerController]
  Pawn[BP_CBT_PlayerPawn]
  GS[BP_CBT_GameState]
  SG[BP_CBT_Singleton]
  TOD[BP_CBT_TimeOfDay]
  Grid[BP_CBT_Grid]
  Save[BP_CBT_SaveGame]
  GI --> WBP_MainMenu
  GI --> Save
  PC --> Pawn
  PC --> Grid
  PC --> Buildings[BP_CBT_BaseBuilding hierarchy]
  PC --> Roads[BP_Road / BP_RoadTile]
  SG --> WBP_PlayerHUD
  TOD --> SG
  GS --> TOD
  Buildings --> Save
  Roads --> Save
AreaPathPurpose
Main menu mapMaps/MainMenuGame default map — WBP_MainMenu
Demo mapMaps/DemoMapEditor startup map and playable city level
Game modeBlueprints/BP_CBT_GameModeSpawns BP_CBT_PlayerPawn + BP_CBT_PlayerController
Game instanceBlueprints/BP_CBT_GameInstanceSave object creation, load-game flag, level travel
Player controllerBlueprints/BP_CBT_PlayerControllerPlacement, roads, bulldoze, building selection, save/load
Player pawnBlueprints/BP_CBT_PlayerPawnTop-down camera movement, zoom, building rotation
Game stateBlueprints/BP_CBT_GameStateESimulationState (paused / normal / double speed)
SingletonBlueprints/BP_CBT_SingletonCurrency, XP, level, population, premium cash, broadcast events
Time of dayBlueprints/BP_CBT_TimeOfDayDay/night cycle, sun rotation, night checks
GridBlueprints/Misc/BP_CBT_GridSnap grid used for building and road placement
BuildingsBlueprints/Buildings/BP_CBT_BaseBuilding, residential/commercial bases, four in-game types
RoadsBlueprints/Roads/BP_Road (spline preview) and BP_RoadTile (placed segments)
VehiclesBlueprints/Environment/BP_VehicleAmbient traffic on road tiles
Save gameBlueprints/BP_CBT_SaveGameBuildings, roads, vehicles, currency, XP, level
WidgetsBlueprints/Widgets/HUD, building/road frames, timers, level-up notifications
GlobalsBlueprints/BFL_CBT_GlobalFunctionsCurrency, grid snap, simulation state helpers
String tableMisc/ST_CityBuilderTemplateLocalized building names and level-up copy
Guided tutorials1_BP_CBT_Tut_*5_BP_CBT_Tut_*In-editor tutorial chain (GuidedTutorials plugin)
BlueprintTypeRole
BP_CBT_HouseResidentialSmall home — adds inhabitants after construction
BP_CBT_ApartmentResidentialLarger residential block
BP_CBT_ShopCommercialGenerates income; manual or auto collect
BP_CBT_OfficeBuildingCommercialHigher-tier commercial income
sequenceDiagram
  participant Menu as WBP_MainMenu
  participant PC as BP_CBT_PlayerController
  participant Grid as BP_CBT_Grid
  participant Bld as BP_CBT_BaseBuilding
  participant SG as BP_CBT_Singleton
  participant HUD as WBP_PlayerHUD
  Menu->>PC: Play Game → DemoMap
  PC->>Grid: Snap placement to grid (GridSize / defaultGridSize)
  PC->>Bld: Preview → Start Construction
  Bld->>SG: AddPopulation / CollectIncome
  SG->>HUD: OnCurrencyUpdated / OnLevelUp
  HUD->>PC: Save / Load / Simulation speed
  1. Main menuPlay Game opens DemoMap; Load Game restores slot CityBuilderSaveGame when a save exists.
  2. Roads first — drag spline roads with BP_Road; placed segments become BP_RoadTile instances snapped to the grid.
  3. Build — pick residential or commercial types from WBP_BuildingSelect / WBP_BuildingFrame; preview with the mouse, rotate with Z / C, place with primary click.
  4. ConstructionBP_CBT_BaseBuilding runs a timer (ConstructionTime); WBP_ConstructionTimer shows remaining time.
  5. Operate — residential buildings add inhabitants up to Inhabitant Max Limit; commercial buildings hire workers and generate income from Revenue Per Worker (collect via WBP_CollectCurrency or bAutoCollectIncome).
  6. ProgressBP_CBT_Singleton tracks XP and city level; WBP_LevelUpNotification announces unlocks (UnlockLevel on each building).
  7. SimulateWBP_PlayerHUD controls Paused, NormalSpeed, and DoubleSpeed via ESimulationState on BP_CBT_GameState.
  8. Day/nightBP_CBT_TimeOfDay rotates the sun (Sun Speed); vehicles and building lights respond via OnDayStarted / OnNightStarted.

Values read from class defaults in the open FAB project (v1.7).

SystemKey defaults
New game walletStarting Currency 100000, Starting Premium Cash 10 (BP_CBT_PlayerController)
Player levelCurrent Level 1, Max Player Level 50
Grid snapGrid Size 200 on controller; Default Grid Size 100, Grid Divisions 4 on BP_CBT_Grid
Save slotCityBuilderSaveGame (user index 0)
Camera (BP_CBT_PlayerPawn)Min Zoom 500, Max Zoom 4500, Zoom Increment 600, Camera Rotation Speed 100
Day/nightSun Speed 10, bEnable Day Night Cycle true
SimulationESimulationState default NormalSpeed on BP_CBT_GameStateNone, Paused, NormalSpeed, DoubleSpeed
BuildingCurrencyPremiumConstruction (s)UnlockXPResidential / commercial
BP_CBT_House1005170Inhabitant Max Limit 4, delay 2 s
BP_CBT_Apartment1010151128Inhabitant Max Limit 12, delay 2.2 s
BP_CBT_Shop51252135Worker Max Limit 10, hire delay 1.5 s, Revenue Per Worker 268, Profit Delay 60 s
BP_CBT_OfficeBuilding1024101200Worker Max Limit 10, hire delay 2.3 s, Revenue Per Worker 1240, Profit Delay 120 s

Shops and offices ship with bAutoCollectIncome = false and bGetXpWhenCollectingCurrency = true (Currency Collect XP = 3).

PageDescription
Getting startedOpen the project, controls, content layout
OverviewStep-by-step customization with example presets
Blueprint referenceActors, enums, structs, functions, and widgets