fix

The City Was a Painting and a Few Hundred Sprites

Andrew Healey decompiled his favourite childhood game: Fast Food Tycoon 2, a 2001 pizza-empire sim that most people have never heard of and that shipped in Europe as Pizza Connection 2. He used Ghidra to turn fastfood2.exe into 9.5 megabytes of C-like text — 4,046 functions — indexed it in SQLite so an agent could search callers and field writes, and then let the agent read the running game's memory to connect code to what was on screen.

What he found is a better essay about game design than most postmortems, because nothing in it was designed to be explained.

The city is a painting and a few hundred sprites

Berlin looks alive. Underneath, ber.tga is a flat painting of streets and plots, with no buildings, people, or cars. Everything else is drawn on top, every frame, by a renderer that only repaints what changed.

The loop is: work out the dirty areas, restore the background there, then draw the scene in passes over a diagonal (isometric) traversal of the map. Colour and lighting are stored separately — 16 bits of colour, one byte of light — and only combined at the end, with a dither pattern to fake intermediate shades.

The trick I keep thinking about is how hidden characters stay visible. The renderer marks a person's shape with a temporary pixel value before drawing the objects that cover them. Later passes find whatever still holds that value, draw a yellow outline around covered body parts and a white one around covered thought icons, then fill the visible parts. No stencil buffer, no shader, no z-order graph. A sentinel value and three passes.

That is the whole aesthetic of the era in one mechanism: you don't have the memory for a proper solution, so you encode the exception into the data and clean it up later.

Lighting as a table and a bitmask

Daylight is a 25-entry hourly brightness table: 70 at night, 251 at midday. Lamps switch on when the light level drops below 160 + (lamp.id & 7), which gives eight thresholds and makes the streetlights come on in small groups instead of all at once. Their light pools are clamped to a minimum of 160 so the pavement never goes fully dark. With default settings, standard lamps turn on around 18:25–18:30 and off around 05:35–05:40.

Building windows use their own light masks — a per-sprite file where each pixel holds a brightness value — so the facade darkens while the sign stays lit, and a second file supplies the night window colours.

None of that is realistic. All of it is legible. The id & 7 is the kind of detail nobody writes in a design doc and everybody feels when it's missing.

The city runs on schedules and stereotypes

Citizens get a daily schedule when they're created, and the schedule doesn't reset each day, so the office worker you saw at the cinema keeps going back. Goths stay home until 09:00. Students have a 40% pub allocation between midnight and 03:00. Big shots have a 70% opera allocation from 18:00 to 21:00.

The game also keeps its own opinion of your pizza. It divides the pie into 24 regions, scores how evenly the toppings are spread, checks for matching pieces on opposite sides, and rates ingredient combinations differently for different customer groups. There is a plagiarism check based on ingredient weights, which means copying a rival's recipe is detected and marked not original — costing taste points with yuppies, goths, and tourists, and a few with big shots.

Healey describes this as solving a childhood mystery, which is the right register. The game never told you any of it. It shipped with a ~100-page manual and let you work it out.

What the decompilation actually shows

Two things, I think.

The first is that "world fidelity" is not one system. It's dozens of small, cheap decisions — dirty rectangles, eight lamp thresholds, persistent schedules, a symmetry check on toppings — that each cost little and compound into a place that feels inhabited. Modern engines give you better tools for all of this, and most games use them to do less, because the budget goes into things you can see in a trailer.

The second is about the archaeology itself. The agent didn't produce insight by itself; Healey built the index, the memory reader, and the patched message handler, then steered with curiosity. The tools compressed the search. The questions were still his: why does this feel alive, how does it know my pizza is bad, what is that lamp doing.

That's the honest version of AI-assisted reverse engineering. Not "the model understood the binary," but "the model made a 25-year-old executable cheap enough to interrogate," which is a different and more useful claim.

Source: Decompiling Fast Food Tycoon 2: Drawing the World — Andrew Healey.

#games#reverse-engineering#software#design