NPC spawning

In Terraria, enemies, critters, and other NPCs will spawn off-screen and enter the screen area based on their AI. The rate at which enemies are spawned, the maximum number of enemies, and the type of enemies spawned are all dependent on the time of day, biome, the tile type of the ground, and other…