Most of them weren't there a minute ago.
Left 4 Dead (Valve, 2008) fills a level with hundreds of zombies using a small set of them. Valve's Michael Booth laid it out in a 2009 talk, The AI Systems of Left 4 Dead: the map is cut into areas, and the wandering zombies in each area are stored as a simple count.
Only the areas around the team are live (Booth calls them the Active Area Set). When an area enters it, its count becomes that many zombies. When the team walks away, the zombies there are deleted and the count goes back up. And once any player can see an area, its count is set to zero, so wanderers aren't made where you've already looked.
Special zombies start in a live area none of the players can see. Mobs come from areas at or behind the team's progress: in Booth's words, "75% of Mobs come from behind". His name for the whole idea: structured unpredictability.
The city, the figures and the numbers in this film are our own simplified version, built in code from the rules on Booth's slides; the counts, the size of the live area and the speeds are ours. The level filled at once and the zombie made in plain sight are our own demonstrations.
Which game's hidden rules should we cut open next?
Sources: Michael Booth, "The AI Systems of Left 4 Dead", Valve, AIIDE 2009 (slides 55-70, valvesoftware.com/en/publications).
Sounds: our own, made in code.
