Im seeing this come up alot and im sure others have posted about it, but i figure i’d basically say what i have to say. Zombies should probably be attracted to players naturally within a certain radius but at a slow rate, they will either very slowly walk towards a player or loosely follow a players tracks at a slow pase the more players or more times that path has been traveled the faster and more come within a time limit of course. i see a few ways you can make these wandering zombies a threat and not just a gimmick.
You can make them walk in hordes
You can make a specialized type of zombie follow them
Or you can make them gather in areas players frequently travel that arent normally spawnpoints
The last one i find interesting particularly because of the potential for common routes to slowly have more zombies or big bases with lots of people become more dangerous so it would make them feel less like a obstacle that probably shouldent have done anything to anyone unless they were clueless and unarmed to a legitimate threat by shear numbers and them always but very slowly often hunting you down especially the more players there are.
the only problem is how this system would work, the lag could be immense by multiple AI constantly trying to follow something or almost constantly, you could have multiple zombies share a single path generated by a Single AI with individual zombies occasionally moving out of a straight line to simulate a horde while being less taxing instep of every individual zombies AI being calculated but that would bring up the problem of when would the system decide to group zombies into a single horde AI.
theres also the fact for the path following i mentioned earlier there will have to be some kind of set of constantly generated points or lines and that could get laggy really fast if that inst optimized along with zombie AI being confused by a constant set of differing paths and points, maybe a system of points that make a graidant map updated when a player walks within a certain vicinity of that point making that point of more “importance” to the zombies while the value for that importance slowly decreases over time to simulate that kind of path finding and following feature while keeping it relatively optimized, The upside or downside to this system to this system depending how you veiw it is that they wouldn’t necessarily be following the players technically but they would be moving to new locations and staying there until another location became of more importance. Another big question is how many points you would want on the map the more points the more the AI has to consider the more that needs to be updated and the lag the system.
You could also just go for the simple approach and have the zombies directly walk towards the player like animals do in 3.0 but and zombies do when agitated by you but thats really simple and could result in more lag or just being annoying as they are always specifically following you and not just the locations you’v been.
one of the biggest challenges if a system were implemented like this is the path finding its always the path finding thats the worse. You could implement something basic for AI path finding like if you run into a object and if the zombie dosent move a certain distance within a certain time turn 90 degrees, Or if that dosent work back up that could be simple enough to work but that could also add alot of lag.
TL;DR i talked about the idea of how zombies gathering where players have been and following them and how you might make a system that accomplishes this while still remaining somewhat optimized