How to run a city builder on 16 MHz
A walkthrough of the original SimCity source code, released in 2008 under the GPL[1] as Micropolis, shows how the game ran a full city simulation on an Intel 386SX clocked at 16 MHz. The core Simulate() function in s_sim.c is called every frame and triggers updates like CrimeScan() and FireAnalysis(), but only for the slice picked by a mod16[2] parameter that cycles from 0 to 15, since updating everything each frame would overwhelm a 1989 CPU. A simulated system reacts to a player's action after 8 frames on average and 15 at worst, which the author argues is barely noticeable in a city builder. The same frame-spreading idea appears in Assetto Corsa (2014), which updates only some faces of its reflection cubemaps[3] per frame according to a FACES_PER_FRAME setting in the .ini file. Unreal's Lumen[4] skips a full lighting recalculation each frame as well, which the article links to both its quality and occasional artifacts with stale reflections.
Read the original larstofus.comDiscussion
Discussion
Commenters list other places the technique appears, from Minecraft's random-tick system and the Stratagus engine to flight simulators of the era that called it "banding". Several question the hardware figures, noting the original box art only required an 8088 with 512 KB of RAM and that the Commodore 64 port ran the city simulation on a 1 MHz 6502 with 64 KB. Others describe the approach as a crude form of task scheduling, since doing all the work in one frame would cause visible stutter in the single-threaded UI.
Sources
-
larstofus.com
How to run a city builder on 16 MHz


