Decompiling Fast Food Tycoon 2: Drawing the World
This article is a deep dive into the technical underpinnings of the 2001 business simulator, Fast Food Tycoon 2, revealed through AI-assisted decompilation. The author leveraged modern AI tools like GPT-6.1 Sol Medium to unravel the game's rendering, lighting, and internal logic. Hacker News loves the blend of retro gaming nostalgia, meticulous technical reverse engineering, and the cutting-edge application of AI to solve complex problems.
The Lowdown
The author embarks on a fascinating journey, using contemporary AI tools to deconstruct Fast Food Tycoon 2 (known in Europe as Pizza Connection 2), a beloved childhood business simulator from 2001. Far from mere nostalgia, this is a detailed technical exploration, revealing the sophisticated design choices that gave the isometric game its surprising world fidelity.
- AI-Powered Decompilation: The project utilized GPT-6.1 Sol Medium and Ghidra to decompile
fastfood2.exeinto 9.5MB of C-like text, indexed with SQLite for efficient querying. TheReadProcessMemoryAPI linked in-game visuals to memory, while a patched Windows message handler allowed the AI agent to control the game's UI and advance the simulation. - World Rendering Wizardry: The game's cities are rendered as base paintings overlaid with sprites. A 'dirty-region' system optimizes drawing by repainting only changed areas (e.g., moving cars, swaying trees). The renderer employs multiple passes to correctly layer objects and reveal hidden elements, such as character outlines behind buildings.
- Dynamic Lighting & Day-Night Cycles: Lighting is driven by a 25-value hourly brightness table, creating a satisfying day-night cycle. Lamps feature varied glow thresholds, illuminating in small groups, with light pools maintaining brightness. Pizzeria windows employ unique light masks and separate color files to ensure they remain vibrant at night.
- Animations and Pathfinding: Character animations are pre-drawn sprite sheets (
.anifiles), often containing German text. Walkers move along predefined pavement and street nodes, with their direction determined by current and next node positions, and varying speeds (e.g., the errand boy is the fastest). - Restaurant Interiors & Quirks: Interior views use a similar rendering process, but with larger character artwork and specific drawing orders for seated figures. Amusingly, citizen schedules don't reset daily, contributing to a sense of a 'living' city, and stereotypes dictate character behavior (e.g., Goths stay home until 9 AM). The game's internal name is 'Pizza3' ('Pizza Connection 2').
- Unlocking the Pizza Scoring Secret: The author solved a childhood mystery, discovering that pizza scoring divides the pie into 24 regions to assess topping distribution, symmetry, and ingredient compatibility. There's even a 'plagiarism check' that penalizes copied competitor recipes, highlighting the game's unexpected depth.
The article masterfully demonstrates how complex systems were engineered in older games, often without in-game guidance, relying instead on comprehensive manuals—a stark contrast to today's gaming experience. The author even used FFT2's decompiled fonts for the post's visuals, adding a meta touch to the exploration.
The Gossip
AI-Assisted Analysis
Commenters largely praise the article's effective use of AI, highlighting it as a prime example of human talent working in conjunction with AI rather than being replaced by it. There's debate about the efficiency of AI usage, with some suggesting more direct integration with tools like Ghidra, and others discussing the problematic nature of measuring AI productivity by token count, likening it to lines of code.
Retro Reminiscence
A wave of nostalgia washes over the comments, with many sharing fond memories of *Fast Food Tycoon 2* and other classic 'Tycoon' or isometric simulation games from the era (e.g., *Caesar 3*, *Patrician 3*). Many relate to the author's experience of discovering 'gems' in discount bins and appreciate the deep dive into the technical details of games from their childhood. There's also a discussion about the aesthetic appeal of pixel art and pre-rendered 3D from that time, with some lamenting the early transition to 3D in sim games.
Deep Dive Discoveries
Specific aspects of the game's mechanics, unearthed by the author's reverse engineering, sparked lively discussion. The revealed intricacies of pizza scoring, such as symmetry checks and ingredient compatibility, surprised many who played the game. The quirky details, like the 'Goths stay home until 9 AM' stereotype and the game's internal 'Pizza3' name, also garnered amusement and further anecdotes from commenters.