Apex City is out now on iOS, Android, Web. This is how it got made: the decisions, the pipeline, and what I would do differently.
What it is
Apex City is a city builder with a real simulation underneath. Every home has residents who need power, water, schools and a safe street. Lay roads, zone districts, build utilities and services, and watch traffic, blackouts and crime emerge from your layout rather than from random events. Fix the water shortage you created, then redesign the district that caused it.
Transport is the endgame: open an airport, a seaport and a rail network, add bus and metro lines and a trucking fleet, feed sawmills, refineries and factories into cargo routes, and ship goods to other mayors on player-to-player routes.
Play together in alliances of up to 50 with weekly events and seasons. Leaderboards reward cooperation; there is no sabotage and no raiding. Everything is earnable with coins, there are no loot boxes, and there is no advertising SDK at all. Your city keeps running on a plane or in a lift and syncs the moment you reconnect.
Brownouts, traffic jams and crime are outcomes of your plan, not luck. And it all runs offline, with no ads and no loot boxes, on iPhone, iPad, Android and the web.
Implementation status (M10, 2026-08-22)
Management depth on top of the M1 systems below. Code: shared/sim/management/, shared/content/management.json, server/src/http/m10Routes.js, client/src/ui/management/. Every number is server-authoritative (simulate()), every panel reads GET /api/city/management.
- Area: Status Notes
- Department budgets (§14): Implemented Police / fire / health / education / transport / parks at 0-150 % (dept action). Radius of that service's buildings x 0.4..1.25, happiness +/- per department weight, cost = base/h x pct x buildings of that kind, booked as departments in the report. Fire budget also sets the extinguish time (5 min at 100 %).
- Ordinances: Implemented (15) management.json ordinances[]: recycling, smoke detectors, free transit, night market, tourism promo, green energy, rent control, neighbourhood watch, insurance, industrial tax break, water conservation, curfew, clean air, job fair, vaccination. Level gated, hourly cost, effects folded by policyModifiers() into pollution, fire risk, crime, income per category, upkeep per category, tourism, rebuild cost, epidemic risk, employment, health, fares/ridership.
- Bonds + credit rating (§14): Implemented AAA..C from (loans + bonds + overdraft) / daily income; 10k / 25k / 50k, 14-day term, rate per rating, 3 open max, C cannot issue; hourly slices beside loans.
- Taxes per zone x density (§14): Implemented taxDensity[zone][d]…
City and tiles
Tile byte layout (6 bytes per cell):
- Byte: Field Values
- 0: zone 0 none, 1 res-low, 2 res-high, 3 com-low, 4 com-high, 5 ind, 6 office, 7 park, 8 special
- 1: road 0 none, 1 street, 2 avenue, 3 highway, 4 rail, 5 metro; high nibble = connection mask N/E/S/W
- 2: terrain 0 grass, 1 sand, 2 water, 3 rock, 4 forest; high nibble = height 0..15
- 3: level density/growth level 0..255 (zoned tiles)
- 4: flags bit0 powered, bit1 watered, bit2 fire-covered, bit3 police, bit4 health, bit5 educated, bit6 polluted, bit7 occupied-by-building
- 5: bref low byte of the index into City.buildings array (0xFF = none); high byte from flags bit7 + level overflow when > 255 buildings (see sim/grid.js bref())
cities.stats_json
XP sources
- Source: XP formula Typical amount at L10 Typical amount at L25
- Collecting production: 10 % of the goods' sell value, min 1 2 per planks batch 16 per furniture batch
- Completing a build or upgrade: cost / 50 30 (1,500-coin clinic) 400 (20,000-coin hospital)
- Completing a road segment: 1 per cell 4 4
- Contract delivered: 15 % of payout 60 300
- Quest step completed: fixed per quest (25 to 2,500) 75 400
- Flight / ship / train arrival: 2 per 10 pax or per tonne, min 5 5 40
- Trade route delivery (player to player): 10 % of goods value, both sides n/a (L15) 120
- Daily task (3 per day): 50 + 12 * level 170 350
- Friend help received / given: 5 5 5
- Population milestone (every 1,000 residents): 250 + 10 * level 350 500
XP is never sold for gems or coins. Gems can rush timers, which indirectly speeds XP, and that indirect path is the only paid acceleration (see section
Levels and XP curve
Levels run 1 to 60. XP required to go from level L to L+1:
Expected XP per day grows with the city (more buildings, longer contracts, more routes), so "days to reach" below assumes an engaged free player who logs in 3 to 4 times a day and uses no gems for speed. Cumulative XP is the total earned since level 1.
- Level: xpToNext Cumulative XP to reach XP/day at this level (typical) Expected day reached
- 1: 120 0 600 0
- 2: 403 120 700 0.2
- 3: 820 523 900 0.8
- 5: 1,999 2,700 1,400 2.5
- 10: 6,747 21,250 3,000 9
- 15: 13,719 68,092 5,500 19
- 20: 22,696 153,874 9,000 32
- 25: 33,541 288,322 13,000 46
- 30: 45,609 480,548 18,000 62
- 40: 76,315 1,072,026 30,000 96
- 50: 113,600 1,994,557 45,000 136
- 59: 150,720 3,158,829 60,000 165
Total XP to cap is about 3.31 million, roughly 5.5 months of regular free play, matching the two-season horizon in
What is next
It is live at https://apexcity.reallexi.io. If you have shipped something similar, I would like to hear what you would have cut.
Top comments (0)