There's no point filling an entire level if monsters only react when the player gets within say 30 tiles. Even line of sight should have limits.
You could add something like an A* heuristic on top where monsters are drawn to the general direction of the player based on a vector, but switch to shortest-path when they're close. (but then you worry about getting stuck I guess)
Consider a semi-open map with 30 tiles sides, we're talking a thousand tiles in total and/or paths a hundred tiles long. For the effect to propagate to the 30th tile away, the propagation algorithm has to iterate more than 30 times.
Graph algorithms are generally slow (whole milliseconds on large graphs) but repeated many times over they can get truly horrendous.
SimCity has several layers like pollution, land value, etc, which slowly diffuse over time. But it only does that computation every so often, not every frame. It has a 16 phase simulation clock, and it scans the cells of the map in eight stripes over eight steps, then scans different layers like taxes, traffic and rate of growth decay, power, pollution and land value, police coverage and crime, population density, fire coverage and disasters, and the RCI valves. (That made it possible to run on a C64!)
Chaim Gingold's SimCity Reverse Diagrams show how the different phases of "Simulate()" perform different kinds of analysis over time, and how the different map layers interact with each other.
https://lively-web.org/users/Dan/uploads/SimCityReverseDiagr...
>SimCity reverse diagrams, by Chaim Gingold (2016).
>These reverse diagrams map and translate the rules of a complex simulation program into a form that is more easily digested, embedded, disseminated, and and discussed (Latour 1986).
>If we merge the reverse diagram with an interactive approach—e.g. Bret Victor’s Nile Visualization (Victor 2013), such diagrams could be used generatively, to describe programs, and interactively, to allow rich introspection and manipulation of software.
>Latour, Bruno (1986). “Visualization and cognition”. In: Knowledge and Society 6 (1986), pp. 1– 40.
>Librande, Stone (2010). “One-Page Designs”. Game Developers Conference. 2010.
>Victor, Bret (2013). “Media for Thinking the Unthinkable”. MIT Media Lab, Apr. 4, 2013.
I think this is also how 3D printers work (effectively). They do a form of scan-line filling to minimise the number of jumps between sections of filament.
https://news.ycombinator.com/item?id=22849522
https://donhopkins.com/home/archive/emacs/mw/display.c
https://donhopkins.com/home/documents/EmacsRedisplayAlgorith...
7. Acknowledgements
The people who did the real work behind this paper are Mike Kazar, Charles Liescrson and Craig Everhart; all from CMU.
Bibliography
1. Kevin Q. Brown. Dynamic Programming in Computer Science. CMU, February, 1979.