Pixel Paw Productions home

Devlog · · Wyatt · 7 min read

I Built a Fake Philadelphia First: Stress-Testing an Open-World City

Today's city, in the game. The mockup in this post came before it, on a street plan of my own.

Before I build the real Philadelphia, I've built a fake one. The mockup city is an invented street plan laid out after Philadelphia: a grid with diagonals, an expressway sunk in a cutting, an elevated highway along a river, a bridge over to a town on the far bank, and an El on steel. Its job is to put every system in the game on city streets at once (traffic, people, trains, weather, lights, buildings) and show me what breaks, before I spend any time on real streets.

Last time was snow, and how sun and shade decide where it lasts. This post is about the city it falls on.

What was there before the city?

The game started as one street corner, built after a piece of reference art: two shop fronts, a kiosk, awnings, a balcony hung with laundry. Around the corner I'd blocked out a made-up city in flat-colored boxes: a street grid, shop fronts with neon blade signs, a stair alley up to a rooftop food terrace, towers with rows of lit windows, an elevated highway on pillars and, past a railing, a sunken market 3 m below the road.

It was a set, not a city. The edges were walled in and the roads went nowhere. Traffic, transit and street life all need streets that go somewhere.

How does the game generate a city?

This week the city got a real pipeline. One plan is the single source of the street layout: junctions and the streets between them, each street with a style (avenue, street or alley). From that plan the game works out everything else:

  • junction boxes, and whether each gets traffic lights or stop signs, by which street matters more;
  • blocks, and lots split by alleys;
  • crosswalks, stop lines and parking bays;
  • the ground itself, generated in 32 m chunks: asphalt, raised blocks with rounded curbs, sidewalks, alleys with dropped curbs, lane paint, zebra crossings, tactile paving and street lamps.

The chunks load and unload on a thread around the view. That's a post of its own. The first full city took 43 seconds to load, and 4 by the end of the same evening.

Buildings come from a facade kit: 40 modules painted to the pixel grid in one atlas, from windows (curtains, blinds, a plant, a grille) to balconies, shop fronts with lit interiors, shutters, awnings, signs, water tanks and AC units. A Building generator takes a footprint, a number of floors, a style and a seed, and merges it all into one mesh. The city builder cuts each lot into plots along its street fronts, the corners going to the bigger street, and puts a building on each. Shops get their things out front: a mart's crates and vending machine, a café's plants and A-frame sign.

Why lay it out after Philadelphia?

The first plan was a square grid. Real cities aren't. On Monday I relaid it after Philadelphia, which meant the plan had to handle a lot more:

  • streets at any 45-degree angle, not just a square grid;
  • blocks as polygons worked out from the street network, each edge inset for its sidewalk, with rounded curbs at any angle;
  • an expressway sunk in a cutting with streets bridging over it, like the 676;
  • an elevated highway along the river, like I-95;
  • a suspension bridge over the river to a town laid out at 45 degrees on the far bank;
  • a minimap and a full map.

Philadelphia makes a good test because it has all of that close together: a grid, diagonals, highways above and below the street, a river and a bridge. If the systems hold up there, I can trust them.

But it isn't the real city. The layout is mine, drawn after Philadelphia's shape, and the blocks and buildings are whatever the generator makes. For the first few days the streets had placeholder names. Yesterday I gave them Philadelphia's names, and the city got a City Hall where the two main streets cross and its first park: a square with a fountain, a bronze lion and a goat. The names are real. The streets under them are still my own plan.

How did trains and the bridge change it?

The plan grew rail on top of the roads: a railway down the middle of the sunken expressway and over the bridge, a subway line under the main street, buses, a ferry across the river and taxis that pick people up. Trains run on timetables worked out from the game clock, and you can stand aboard and ride.

Two pieces this week came straight from looking at the real city:

  • The bridge. I rebuilt it like the Ben Franklin Bridge: the railway along the deck's outer edges and the cars between, about as wide as the real one. The two tracks never cross the road, so the trains run as shuttles, one on each track.
  • The El. The subway line comes up out of the ground and runs over a street on steel: a deck between deep plate girders and, every 15 m, a cross girder on two columns at the curbs of the street below, never in a junction. The elevated stations' stairs wrap round on the sidewalk, never out over the road.

Height matters everywhere now. A driver on the elevated highway doesn't brake for someone walking on the street under it: cars only stop for people on their own level.

What does the map look like now?

The first map read as a debug view, so I redrew it as a printed street map: cream paper blocks, gray-brown streets, pale yellow avenues, orange expressways, hatched water, parks dotted with trees, and rail lines with dark casings and round station markers. It sits in a frame with a title plaque naming the district under the crosshair, a compass and a legend for the lines. You can drop a pin and it draws and tells you the way there. Labels keep clear of each other.

Today's in-game map, in the printed style from this week. It shows the real streets that later replaced the mockup, not the mockup itself.
Today's in-game map, in the printed style from this week. It shows the real streets that later replaced the mockup, not the mockup itself.

The city has districts now: 13 neighborhoods drawn on the plan. Three have their own profiles so far, Center City, Rittenhouse and Old City, each with its own building styles, upkeep and crowds. Rittenhouse is swept. Center City is worn down by its crowds. And the facade kit grew a Philadelphia set: sash windows with stone lintels, bracketed cornices, rowhouse doors up marble or brownstone steps, and signs in English that fit the shop under them (DELI, CAFE, STEAKS, TAVERN) in a 5x7 pixel font.

What did the mockup teach me?

Mostly that things that work on one street corner break on a whole city. A few of the bugs it found:

  • Buildings with the same layout made the same random picks, because they were seeded from positions in the building's own space. Shops opened in sync across town.
  • Building plots were seeded from one stream through every lot in turn, so adding a block anywhere changed every building after it. Now each lot seeds from where it is.
  • The junctions' turn lists had been empty the whole time, because of an array copied instead of shared, so conflicts at junctions were never recorded.
  • A taxi planning a drop-off searched every lane point in the city: about 20 ms a call, two calls a plan.
  • Subway stairwells landed in the road. Now each slides along a meter at a time until the whole opening is on the sidewalk.
  • Around the square at City Hall, every lane could turn into every lane, so cars turned right across each other and the corners locked solid. Now lanes meet the way they do on a real road.
  • Working out the city's layout at startup took about 6 seconds. Looking up only the streets and blocks near each point brought it to about 1.

The bigger lesson: none of this can be hand-placed. I place the plan by hand: the junctions, the streets, the rail lines, the parks. Everything else has to follow from rules, because the plan keeps changing, and every change has to rebuild the city around it.

Quick answers

Is this the real Philadelphia? No. It's an invented layout drawn after Philadelphia, to test the game's systems on city streets. It uses Philadelphia's names now, on my own street plan.

Why not build the real streets straight away? I needed to know that traffic, people, trains, weather and lights work on city streets first. A mockup is quick to change. Real streets aren't.

Is the city built by hand? The plan is: junctions, streets, rail lines and parks. Everything else (blocks, lots, buildings, curbs, paint and lamps) is generated from it.

Follow along

Philadelphia Fiefdom is a single-player sandbox in a pixel art city laid out after Philadelphia. If you missed it, the last post was about snow that builds up. Next: walking into buildings. Join the playtest list to play it early, or come say hi on Discord (opens in a new tab).

Get updates by email

One email when there's something worth seeing: new footage, playtest invites, the day the Steam page goes up and launch day.

No spam. Unsubscribe any time. Privacy

Want to play early? Join the playtest list. Rather chat? Hang out on Discord (opens in a new tab).