What is the best optimized way to create a world full of zombie?

Hello everyone, I’m currently working on a medieval-themed zombie survival sandbox game. The game will have a large map, so of course, it needs to be filled with zombies. However, I’m a bit unclear on how to implement this most effectively. I want the system to work like this:

  • There will be clusters of zombies scattered throughout the map, in villages, houses, and towns.
  • There will be a few zombies in some places, and groups of varying sizes in others.
  • Most zombies will stand still, while a few will wander around.
  • My world will have places where survivors live. Zombies will frequently attack these locations, usually in small numbers, but sometimes in hordes if certain conditions are met.
  • Zombies will not respawn.

With the zombie system described above, I could create the world and spawn zombies in the desired locations, but that would make the game very laggy, right? I’m thinking of creating fixed zombie spawn points, and only spawning zombies when the player is nearby (within a 1km radius, for example). The zombies would only spawn once in a given area (for example, a residential area would have 12 spawn areas, each area spawn 6 zombies, and once those zombies are killed, no more would spawn in that area). Would this be feasible and optimal?

Please let me know your thoughts on the implementation method I described above. Please also let me know what you think is the most feasible and optimal implementation method, and if possible, provide some examples of how to do it. I would really appreciate it. Thank you very much.