SimCity 2K Power

BlitzMax Forums/BlitzMax Programming/SimCity 2K Power

I'm playing around with a SimCity 2K clone and am trying to find an elegant way of implementing the power network. Essentially a cell has power if it can trace a path, through adjoining powered cells to a power source.

While it is true that if a neighboring cell has power then every cell next to it will be powered, the problem is propagating changes when a power line is broken.

I know the real SimCity 2K used cellular automata heavily but I don't see how it can really work here.

I want to avoid doing an algorithm that keeps checking for an actual path from each cell to a source. Seems way to cumbersome. There must be a more efficient way to do it.

I would appreciate any thoughts or ideas.